Skip to content

Rename factories #24

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 18, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use PhpSpec\Exception\Example\SkippingException;
use PhpSpec\ObjectBehavior;

class DiactorosFactorySpec extends ObjectBehavior
class DiactorosMessageFactorySpec extends ObjectBehavior
{
function let()
{
Expand All @@ -17,7 +17,7 @@ function let()

function it_is_initializable()
{
$this->shouldHaveType('Http\Discovery\MessageFactory\DiactorosFactory');
$this->shouldHaveType('Http\Discovery\MessageFactory\DiactorosMessageFactory');
}

function it_is_a_message_factory()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
use Psr\Http\Message\StreamInterface;
use PhpSpec\ObjectBehavior;

class GuzzleFactorySpec extends ObjectBehavior
class GuzzleMessageFactorySpec extends ObjectBehavior
{
function it_is_initializable()
{
$this->shouldHaveType('Http\Discovery\MessageFactory\GuzzleFactory');
$this->shouldHaveType('Http\Discovery\MessageFactory\GuzzleMessageFactory');
}

function it_is_a_message_factory()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use PhpSpec\Exception\Example\SkippingException;
use PhpSpec\ObjectBehavior;

class DiactorosFactorySpec extends ObjectBehavior
class DiactorosUriFactorySpec extends ObjectBehavior
{
function let()
{
Expand All @@ -17,7 +17,7 @@ function let()

function it_is_initializable()
{
$this->shouldHaveType('Http\Discovery\UriFactory\DiactorosFactory');
$this->shouldHaveType('Http\Discovery\UriFactory\DiactorosUriFactory');
}

function it_is_a_uri_factory()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
use Psr\Http\Message\UriInterface;
use PhpSpec\ObjectBehavior;

class GuzzleFactorySpec extends ObjectBehavior
class GuzzleUriFactorySpec extends ObjectBehavior
{
function it_is_initializable()
{
$this->shouldHaveType('Http\Discovery\UriFactory\GuzzleFactory');
$this->shouldHaveType('Http\Discovery\UriFactory\GuzzleUriFactory');
}

function it_is_a_uri_factory()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*
* @author GeLo <[email protected]>
*/
final class DiactorosFactory implements MessageFactory
final class DiactorosMessageFactory implements MessageFactory
{
/**
* @var DiactorosStreamFactory
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*
* @author Márk Sági-Kazár <[email protected]>
*/
final class GuzzleFactory implements MessageFactory
final class GuzzleMessageFactory implements MessageFactory
{
/**
* {@inheritdoc}
Expand Down
4 changes: 2 additions & 2 deletions src/MessageFactoryDiscovery.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ final class MessageFactoryDiscovery extends ClassDiscovery
*/
protected static $classes = [
'guzzle' => [
'class' => 'Http\Discovery\MessageFactory\GuzzleFactory',
'class' => 'Http\Discovery\MessageFactory\GuzzleMessageFactory',
'condition' => 'GuzzleHttp\Psr7\Request',
],
'diactoros' => [
'class' => 'Http\Discovery\MessageFactory\DiactorosFactory',
'class' => 'Http\Discovery\MessageFactory\DiactorosMessageFactory',
'condition' => 'Zend\Diactoros\Request',
],
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*
* @author David de Boer <[email protected]>
*/
final class DiactorosFactory implements UriFactory
final class DiactorosUriFactory implements UriFactory
{
/**
* {@inheritdoc}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*
* @author David de Boer <[email protected]>
*/
final class GuzzleFactory implements UriFactory
final class GuzzleUriFactory implements UriFactory
{
/**
* {@inheritdoc}
Expand Down
4 changes: 2 additions & 2 deletions src/UriFactoryDiscovery.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ final class UriFactoryDiscovery extends ClassDiscovery
*/
protected static $classes = [
'guzzle' => [
'class' => 'Http\Discovery\UriFactory\GuzzleFactory',
'class' => 'Http\Discovery\UriFactory\GuzzleUriFactory',
'condition' => 'GuzzleHttp\Psr7\Uri',
],
'diactoros' => [
'class' => 'Http\Discovery\UriFactory\DiactorosFactory',
'class' => 'Http\Discovery\UriFactory\DiactorosUriFactory',
'condition' => 'Zend\Diactoros\Uri',
],
];
Expand Down