>>>>';
- $op->prepare()->setResponse(new Response(200, array(
- 'Content-Type' => 'application/xml'
- ), $brokenXml), true);
- $result = $op->execute();
- $this->assertEquals(array('baz'), $result->getKeys());
- $this->assertEquals($brokenXml, (string) $result['baz']);
- }
-
- public function testVisitsAdditionalProperties()
- {
- $parser = OperationResponseParser::getInstance();
- $description = ServiceDescription::factory(array(
- 'operations' => array('test' => array('responseClass' => 'Foo')),
- 'models' => array(
- 'Foo' => array(
- 'type' => 'object',
- 'properties' => array(
- 'code' => array('location' => 'statusCode')
- ),
- 'additionalProperties' => array(
- 'location' => 'json',
- 'type' => 'object',
- 'properties' => array(
- 'a' => array(
- 'type' => 'string',
- 'filters' => 'strtoupper'
- )
- )
- )
- )
- )
- ));
-
- $operation = $description->getOperation('test');
- $op = new OperationCommand(array(), $operation);
- $op->setResponseParser($parser)->setClient(new Client());
- $json = '[{"a":"test"},{"a":"baz"}]';
- $op->prepare()->setResponse(new Response(200, array('Content-Type' => 'application/json'), $json), true);
- $result = $op->execute()->toArray();
- $this->assertEquals(array(
- 'code' => 200,
- array('a' => 'TEST'),
- array('a' => 'BAZ')
- ), $result);
- }
-
- /**
- * @group issue-399
- * @link https://github.com/guzzle/guzzle/issues/399
- */
- public function testAdditionalPropertiesDisabledDiscardsData()
- {
- $parser = OperationResponseParser::getInstance();
- $description = ServiceDescription::factory(array(
- 'operations' => array('test' => array('responseClass' => 'Foo')),
- 'models' => array(
- 'Foo' => array(
- 'type' => 'object',
- 'additionalProperties' => false,
- 'properties' => array(
- 'name' => array(
- 'location' => 'json',
- 'type' => 'string',
- ),
- 'nested' => array(
- 'location' => 'json',
- 'type' => 'object',
- 'additionalProperties' => false,
- 'properties' => array(
- 'width' => array(
- 'type' => 'integer'
- )
- ),
- ),
- 'code' => array('location' => 'statusCode')
- ),
-
- )
- )
- ));
-
- $operation = $description->getOperation('test');
- $op = new OperationCommand(array(), $operation);
- $op->setResponseParser($parser)->setClient(new Client());
- $json = '{"name":"test", "volume":2.0, "nested":{"width":10,"bogus":1}}';
- $op->prepare()->setResponse(new Response(200, array('Content-Type' => 'application/json'), $json), true);
- $result = $op->execute()->toArray();
- $this->assertEquals(array(
- 'name' => 'test',
- 'nested' => array(
- 'width' => 10,
- ),
- 'code' => 200
- ), $result);
- }
-
- public function testCreatesCustomResponseClassInterface()
- {
- $parser = OperationResponseParser::getInstance();
- $description = ServiceDescription::factory(array(
- 'operations' => array('test' => array('responseClass' => 'Guzzle\Tests\Mock\CustomResponseModel'))
- ));
- $operation = $description->getOperation('test');
- $op = new OperationCommand(array(), $operation);
- $op->setResponseParser($parser)->setClient(new Client());
- $op->prepare()->setResponse(new Response(200, array('Content-Type' => 'application/json'), 'hi!'), true);
- $result = $op->execute();
- $this->assertInstanceOf('Guzzle\Tests\Mock\CustomResponseModel', $result);
- $this->assertSame($op, $result->command);
- }
-
- /**
- * @expectedException \Guzzle\Service\Exception\ResponseClassException
- * @expectedExceptionMessage must exist
- */
- public function testEnsuresResponseClassExists()
- {
- $parser = OperationResponseParser::getInstance();
- $description = ServiceDescription::factory(array(
- 'operations' => array('test' => array('responseClass' => 'Foo\Baz\Bar'))
- ));
- $operation = $description->getOperation('test');
- $op = new OperationCommand(array(), $operation);
- $op->setResponseParser($parser)->setClient(new Client());
- $op->prepare()->setResponse(new Response(200, array('Content-Type' => 'application/json'), 'hi!'), true);
- $op->execute();
- }
-
- /**
- * @expectedException \Guzzle\Service\Exception\ResponseClassException
- * @expectedExceptionMessage and implement
- */
- public function testEnsuresResponseClassImplementsResponseClassInterface()
- {
- $parser = OperationResponseParser::getInstance();
- $description = ServiceDescription::factory(array(
- 'operations' => array('test' => array('responseClass' => __CLASS__))
- ));
- $operation = $description->getOperation('test');
- $op = new OperationCommand(array(), $operation);
- $op->setResponseParser($parser)->setClient(new Client());
- $op->prepare()->setResponse(new Response(200, array('Content-Type' => 'application/json'), 'hi!'), true);
- $op->execute();
- }
-
- protected function getDescription()
- {
- return ServiceDescription::factory(array(
- 'operations' => array('test' => array('responseClass' => 'Foo')),
- 'models' => array(
- 'Foo' => array(
- 'type' => 'object',
- 'properties' => array(
- 'baz' => array('type' => 'string', 'location' => 'json'),
- 'code' => array('location' => 'statusCode'),
- 'phrase' => array('location' => 'reasonPhrase'),
- )
- )
- )
- ));
- }
-
- public function testCanAddListenerToParseDomainObjects()
- {
- $client = new Client();
- $client->setDescription(ServiceDescription::factory(array(
- 'operations' => array('test' => array('responseClass' => 'FooBazBar'))
- )));
- $foo = new \stdClass();
- $client->getEventDispatcher()->addListener('command.parse_response', function ($e) use ($foo) {
- $e['result'] = $foo;
- });
- $command = $client->getCommand('test');
- $command->prepare()->setResponse(new Response(200), true);
- $result = $command->execute();
- $this->assertSame($result, $foo);
- }
-
- /**
- * @group issue-399
- * @link https://github.com/guzzle/guzzle/issues/501
- */
- public function testAdditionalPropertiesWithRefAreResolved()
- {
- $parser = OperationResponseParser::getInstance();
- $description = ServiceDescription::factory(array(
- 'operations' => array('test' => array('responseClass' => 'Foo')),
- 'models' => array(
- 'Baz' => array('type' => 'string'),
- 'Foo' => array(
- 'type' => 'object',
- 'additionalProperties' => array('$ref' => 'Baz', 'location' => 'json')
- )
- )
- ));
- $operation = $description->getOperation('test');
- $op = new OperationCommand(array(), $operation);
- $op->setResponseParser($parser)->setClient(new Client());
- $json = '{"a":"a","b":"b","c":"c"}';
- $op->prepare()->setResponse(new Response(200, array('Content-Type' => 'application/json'), $json), true);
- $result = $op->execute()->toArray();
- $this->assertEquals(array('a' => 'a', 'b' => 'b', 'c' => 'c'), $result);
- }
-}
diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Description/OperationTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Description/OperationTest.php
deleted file mode 100644
index ae33b692580..00000000000
--- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Description/OperationTest.php
+++ /dev/null
@@ -1,308 +0,0 @@
- 'test',
- 'summary' => 'doc',
- 'notes' => 'notes',
- 'documentationUrl' => 'http://www.example.com',
- 'httpMethod' => 'POST',
- 'uri' => '/api/v1',
- 'responseClass' => 'array',
- 'responseNotes' => 'returns the json_decoded response',
- 'deprecated' => true,
- 'parameters' => array(
- 'key' => array(
- 'required' => true,
- 'type' => 'string',
- 'maxLength' => 10
- ),
- 'key_2' => array(
- 'required' => true,
- 'type' => 'integer',
- 'default' => 10
- )
- )
- ));
-
- $this->assertEquals('test', $c->getName());
- $this->assertEquals('doc', $c->getSummary());
- $this->assertEquals('http://www.example.com', $c->getDocumentationUrl());
- $this->assertEquals('POST', $c->getHttpMethod());
- $this->assertEquals('/api/v1', $c->getUri());
- $this->assertEquals('array', $c->getResponseClass());
- $this->assertEquals('returns the json_decoded response', $c->getResponseNotes());
- $this->assertTrue($c->getDeprecated());
- $this->assertEquals('Guzzle\\Service\\Command\\OperationCommand', $c->getClass());
- $this->assertEquals(array(
- 'key' => new Parameter(array(
- 'name' => 'key',
- 'required' => true,
- 'type' => 'string',
- 'maxLength' => 10,
- 'parent' => $c
- )),
- 'key_2' => new Parameter(array(
- 'name' => 'key_2',
- 'required' => true,
- 'type' => 'integer',
- 'default' => 10,
- 'parent' => $c
- ))
- ), $c->getParams());
-
- $this->assertEquals(new Parameter(array(
- 'name' => 'key_2',
- 'required' => true,
- 'type' => 'integer',
- 'default' => 10,
- 'parent' => $c
- )), $c->getParam('key_2'));
-
- $this->assertNull($c->getParam('afefwef'));
- $this->assertArrayNotHasKey('parent', $c->getParam('key_2')->toArray());
- }
-
- public function testAllowsConcreteCommands()
- {
- $c = new Operation(array(
- 'name' => 'test',
- 'class' => 'Guzzle\\Service\\Command\ClosureCommand',
- 'parameters' => array(
- 'p' => new Parameter(array(
- 'name' => 'foo'
- ))
- )
- ));
- $this->assertEquals('Guzzle\\Service\\Command\ClosureCommand', $c->getClass());
- }
-
- public function testConvertsToArray()
- {
- $data = array(
- 'name' => 'test',
- 'class' => 'Guzzle\\Service\\Command\ClosureCommand',
- 'summary' => 'test',
- 'documentationUrl' => 'http://www.example.com',
- 'httpMethod' => 'PUT',
- 'uri' => '/',
- 'parameters' => array('p' => array('name' => 'foo'))
- );
- $c = new Operation($data);
- $toArray = $c->toArray();
- unset($data['name']);
- $this->assertArrayHasKey('parameters', $toArray);
- $this->assertInternalType('array', $toArray['parameters']);
-
- // Normalize the array
- unset($data['parameters']);
- unset($toArray['parameters']);
-
- $data['responseType'] = 'primitive';
- $data['responseClass'] = 'array';
- $this->assertEquals($data, $toArray);
- }
-
- public function testDeterminesIfHasParam()
- {
- $command = $this->getTestCommand();
- $this->assertTrue($command->hasParam('data'));
- $this->assertFalse($command->hasParam('baz'));
- }
-
- public function testReturnsParamNames()
- {
- $command = $this->getTestCommand();
- $this->assertEquals(array('data'), $command->getParamNames());
- }
-
- protected function getTestCommand()
- {
- return new Operation(array(
- 'parameters' => array(
- 'data' => new Parameter(array(
- 'type' => 'string'
- ))
- )
- ));
- }
-
- public function testCanBuildUpCommands()
- {
- $c = new Operation(array());
- $c->setName('foo')
- ->setClass('Baz')
- ->setDeprecated(false)
- ->setSummary('summary')
- ->setDocumentationUrl('http://www.foo.com')
- ->setHttpMethod('PUT')
- ->setResponseNotes('oh')
- ->setResponseClass('string')
- ->setUri('/foo/bar')
- ->addParam(new Parameter(array(
- 'name' => 'test'
- )));
-
- $this->assertEquals('foo', $c->getName());
- $this->assertEquals('Baz', $c->getClass());
- $this->assertEquals(false, $c->getDeprecated());
- $this->assertEquals('summary', $c->getSummary());
- $this->assertEquals('http://www.foo.com', $c->getDocumentationUrl());
- $this->assertEquals('PUT', $c->getHttpMethod());
- $this->assertEquals('oh', $c->getResponseNotes());
- $this->assertEquals('string', $c->getResponseClass());
- $this->assertEquals('/foo/bar', $c->getUri());
- $this->assertEquals(array('test'), $c->getParamNames());
- }
-
- public function testCanRemoveParams()
- {
- $c = new Operation(array());
- $c->addParam(new Parameter(array('name' => 'foo')));
- $this->assertTrue($c->hasParam('foo'));
- $c->removeParam('foo');
- $this->assertFalse($c->hasParam('foo'));
- }
-
- public function testAddsNameToParametersIfNeeded()
- {
- $command = new Operation(array('parameters' => array('foo' => new Parameter(array()))));
- $this->assertEquals('foo', $command->getParam('foo')->getName());
- }
-
- public function testContainsApiErrorInformation()
- {
- $command = $this->getOperation();
- $this->assertEquals(1, count($command->getErrorResponses()));
- $arr = $command->toArray();
- $this->assertEquals(1, count($arr['errorResponses']));
- $command->addErrorResponse(400, 'Foo', 'Baz\\Bar');
- $this->assertEquals(2, count($command->getErrorResponses()));
- $command->setErrorResponses(array());
- $this->assertEquals(0, count($command->getErrorResponses()));
- }
-
- public function testHasNotes()
- {
- $o = new Operation(array('notes' => 'foo'));
- $this->assertEquals('foo', $o->getNotes());
- $o->setNotes('bar');
- $this->assertEquals('bar', $o->getNotes());
- }
-
- public function testHasData()
- {
- $o = new Operation(array('data' => array('foo' => 'baz', 'bar' => 123)));
- $o->setData('test', false);
- $this->assertEquals('baz', $o->getData('foo'));
- $this->assertEquals(123, $o->getData('bar'));
- $this->assertNull($o->getData('wfefwe'));
- $this->assertEquals(array(
- 'parameters' => array(),
- 'class' => 'Guzzle\Service\Command\OperationCommand',
- 'data' => array('foo' => 'baz', 'bar' => 123, 'test' => false),
- 'responseClass' => 'array',
- 'responseType' => 'primitive'
- ), $o->toArray());
- }
-
- public function testHasServiceDescription()
- {
- $s = new ServiceDescription();
- $o = new Operation(array(), $s);
- $this->assertSame($s, $o->getServiceDescription());
- }
-
- /**
- * @expectedException Guzzle\Common\Exception\InvalidArgumentException
- */
- public function testValidatesResponseType()
- {
- $o = new Operation(array('responseClass' => 'array', 'responseType' => 'foo'));
- }
-
- public function testInfersResponseType()
- {
- $o = $this->getOperation();
- $o->setServiceDescription(new ServiceDescription(array('models' => array('Foo' => array()))));
- $this->assertEquals('primitive', $o->getResponseType());
- $this->assertEquals('primitive', $o->setResponseClass('boolean')->getResponseType());
- $this->assertEquals('primitive', $o->setResponseClass('array')->getResponseType());
- $this->assertEquals('primitive', $o->setResponseClass('integer')->getResponseType());
- $this->assertEquals('primitive', $o->setResponseClass('string')->getResponseType());
- $this->assertEquals('class', $o->setResponseClass('foo')->getResponseType());
- $this->assertEquals('class', $o->setResponseClass(__CLASS__)->getResponseType());
- $this->assertEquals('model', $o->setResponseClass('Foo')->getResponseType());
- }
-
- public function testHasResponseType()
- {
- // infers in the constructor
- $o = new Operation(array('responseClass' => 'array'));
- $this->assertEquals('primitive', $o->getResponseType());
- // Infers when set
- $o = new Operation();
- $this->assertEquals('primitive', $o->getResponseType());
- $this->assertEquals('model', $o->setResponseType('model')->getResponseType());
- }
-
- public function testHasAdditionalParameters()
- {
- $o = new Operation(array(
- 'additionalParameters' => array(
- 'type' => 'string', 'name' => 'binks'
- ),
- 'parameters' => array(
- 'foo' => array('type' => 'integer')
- )
- ));
- $this->assertEquals('string', $o->getAdditionalParameters()->getType());
- $arr = $o->toArray();
- $this->assertEquals(array(
- 'type' => 'string'
- ), $arr['additionalParameters']);
- }
-
- /**
- * @return Operation
- */
- protected function getOperation()
- {
- return new Operation(array(
- 'name' => 'OperationTest',
- 'class' => get_class($this),
- 'parameters' => array(
- 'test' => array('type' => 'object'),
- 'bool_1' => array('default' => true, 'type' => 'boolean'),
- 'bool_2' => array('default' => false),
- 'float' => array('type' => 'numeric'),
- 'int' => array('type' => 'integer'),
- 'date' => array('type' => 'string'),
- 'timestamp' => array('type' => 'string'),
- 'string' => array('type' => 'string'),
- 'username' => array('type' => 'string', 'required' => true, 'filters' => 'strtolower'),
- 'test_function' => array('type' => 'string', 'filters' => __CLASS__ . '::strtoupper')
- ),
- 'errorResponses' => array(
- array('code' => 503, 'reason' => 'InsufficientCapacity', 'class' => 'Guzzle\\Exception\\RuntimeException')
- )
- ));
- }
-}
diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Description/ParameterTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Description/ParameterTest.php
deleted file mode 100644
index b9c162aae01..00000000000
--- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Description/ParameterTest.php
+++ /dev/null
@@ -1,411 +0,0 @@
- 'foo',
- 'type' => 'bar',
- 'required' => true,
- 'default' => '123',
- 'description' => '456',
- 'minLength' => 2,
- 'maxLength' => 5,
- 'location' => 'body',
- 'static' => 'static!',
- 'filters' => array('trim', 'json_encode')
- );
-
- public function testCreatesParamFromArray()
- {
- $p = new Parameter($this->data);
- $this->assertEquals('foo', $p->getName());
- $this->assertEquals('bar', $p->getType());
- $this->assertEquals(true, $p->getRequired());
- $this->assertEquals('123', $p->getDefault());
- $this->assertEquals('456', $p->getDescription());
- $this->assertEquals(2, $p->getMinLength());
- $this->assertEquals(5, $p->getMaxLength());
- $this->assertEquals('body', $p->getLocation());
- $this->assertEquals('static!', $p->getStatic());
- $this->assertEquals(array('trim', 'json_encode'), $p->getFilters());
- }
-
- public function testCanConvertToArray()
- {
- $p = new Parameter($this->data);
- unset($this->data['name']);
- $this->assertEquals($this->data, $p->toArray());
- }
-
- public function testUsesStatic()
- {
- $d = $this->data;
- $d['default'] = 'booboo';
- $d['static'] = true;
- $p = new Parameter($d);
- $this->assertEquals('booboo', $p->getValue('bar'));
- }
-
- public function testUsesDefault()
- {
- $d = $this->data;
- $d['default'] = 'foo';
- $d['static'] = null;
- $p = new Parameter($d);
- $this->assertEquals('foo', $p->getValue(null));
- }
-
- public function testReturnsYourValue()
- {
- $d = $this->data;
- $d['static'] = null;
- $p = new Parameter($d);
- $this->assertEquals('foo', $p->getValue('foo'));
- }
-
- public function testZeroValueDoesNotCauseDefaultToBeReturned()
- {
- $d = $this->data;
- $d['default'] = '1';
- $d['static'] = null;
- $p = new Parameter($d);
- $this->assertEquals('0', $p->getValue('0'));
- }
-
- public function testFiltersValues()
- {
- $d = $this->data;
- $d['static'] = null;
- $d['filters'] = 'strtoupper';
- $p = new Parameter($d);
- $this->assertEquals('FOO', $p->filter('foo'));
- }
-
- public function testConvertsBooleans()
- {
- $p = new Parameter(array('type' => 'boolean'));
- $this->assertEquals(true, $p->filter('true'));
- $this->assertEquals(false, $p->filter('false'));
- }
-
- public function testUsesArrayByDefaultForFilters()
- {
- $d = $this->data;
- $d['filters'] = null;
- $p = new Parameter($d);
- $this->assertEquals(array(), $p->getFilters());
- }
-
- public function testAllowsSimpleLocationValue()
- {
- $p = new Parameter(array('name' => 'myname', 'location' => 'foo', 'sentAs' => 'Hello'));
- $this->assertEquals('foo', $p->getLocation());
- $this->assertEquals('Hello', $p->getSentAs());
- }
-
- public function testParsesTypeValues()
- {
- $p = new Parameter(array('type' => 'foo'));
- $this->assertEquals('foo', $p->getType());
- }
-
- /**
- * @expectedException InvalidArgumentException
- * @expectedExceptionMessage A [method] value must be specified for each complex filter
- */
- public function testValidatesComplexFilters()
- {
- $p = new Parameter(array('filters' => array(array('args' => 'foo'))));
- }
-
- public function testCanBuildUpParams()
- {
- $p = new Parameter(array());
- $p->setName('foo')
- ->setDescription('c')
- ->setFilters(array('d'))
- ->setLocation('e')
- ->setSentAs('f')
- ->setMaxLength(1)
- ->setMinLength(1)
- ->setMinimum(2)
- ->setMaximum(2)
- ->setMinItems(3)
- ->setMaxItems(3)
- ->setRequired(true)
- ->setStatic(true)
- ->setDefault('h')
- ->setType('i');
-
- $p->addFilter('foo');
-
- $this->assertEquals('foo', $p->getName());
- $this->assertEquals('h', $p->getDefault());
- $this->assertEquals('c', $p->getDescription());
- $this->assertEquals(array('d', 'foo'), $p->getFilters());
- $this->assertEquals('e', $p->getLocation());
- $this->assertEquals('f', $p->getSentAs());
- $this->assertEquals(1, $p->getMaxLength());
- $this->assertEquals(1, $p->getMinLength());
- $this->assertEquals(2, $p->getMaximum());
- $this->assertEquals(2, $p->getMinimum());
- $this->assertEquals(3, $p->getMaxItems());
- $this->assertEquals(3, $p->getMinItems());
- $this->assertEquals(true, $p->getRequired());
- $this->assertEquals(true, $p->getStatic());
- $this->assertEquals('i', $p->getType());
- }
-
- public function testAllowsNestedShape()
- {
- $command = $this->getServiceBuilder()->get('mock')->getCommand('mock_command')->getOperation();
- $param = new Parameter(array(
- 'parent' => $command,
- 'name' => 'foo',
- 'type' => 'object',
- 'location' => 'query',
- 'properties' => array(
- 'foo' => array(
- 'type' => 'object',
- 'required' => true,
- 'properties' => array(
- 'baz' => array(
- 'name' => 'baz',
- 'type' => 'bool',
- )
- )
- ),
- 'bar' => array(
- 'name' => 'bar',
- 'default' => '123'
- )
- )
- ));
-
- $this->assertSame($command, $param->getParent());
- $this->assertNotEmpty($param->getProperties());
- $this->assertInstanceOf('Guzzle\Service\Description\Parameter', $param->getProperty('foo'));
- $this->assertSame($param, $param->getProperty('foo')->getParent());
- $this->assertSame($param->getProperty('foo'), $param->getProperty('foo')->getProperty('baz')->getParent());
- $this->assertInstanceOf('Guzzle\Service\Description\Parameter', $param->getProperty('bar'));
- $this->assertSame($param, $param->getProperty('bar')->getParent());
-
- $array = $param->toArray();
- $this->assertInternalType('array', $array['properties']);
- $this->assertArrayHasKey('foo', $array['properties']);
- $this->assertArrayHasKey('bar', $array['properties']);
- }
-
- public function testAllowsComplexFilters()
- {
- $that = $this;
- $param = new Parameter(array());
- $param->setFilters(array(array('method' => function ($a, $b, $c, $d) use ($that, $param) {
- $that->assertEquals('test', $a);
- $that->assertEquals('my_value!', $b);
- $that->assertEquals('bar', $c);
- $that->assertSame($param, $d);
- return 'abc' . $b;
- }, 'args' => array('test', '@value', 'bar', '@api'))));
- $this->assertEquals('abcmy_value!', $param->filter('my_value!'));
- }
-
- public function testCanChangeParentOfNestedParameter()
- {
- $param1 = new Parameter(array('name' => 'parent'));
- $param2 = new Parameter(array('name' => 'child'));
- $param2->setParent($param1);
- $this->assertSame($param1, $param2->getParent());
- }
-
- public function testCanRemoveFromNestedStructure()
- {
- $param1 = new Parameter(array('name' => 'parent'));
- $param2 = new Parameter(array('name' => 'child'));
- $param1->addProperty($param2);
- $this->assertSame($param1, $param2->getParent());
- $this->assertSame($param2, $param1->getProperty('child'));
-
- // Remove a single child from the structure
- $param1->removeProperty('child');
- $this->assertNull($param1->getProperty('child'));
- // Remove the entire structure
- $param1->addProperty($param2);
- $param1->removeProperty('child');
- $this->assertNull($param1->getProperty('child'));
- }
-
- public function testAddsAdditionalProperties()
- {
- $p = new Parameter(array(
- 'type' => 'object',
- 'additionalProperties' => array('type' => 'string')
- ));
- $this->assertInstanceOf('Guzzle\Service\Description\Parameter', $p->getAdditionalProperties());
- $this->assertNull($p->getAdditionalProperties()->getAdditionalProperties());
- $p = new Parameter(array('type' => 'object'));
- $this->assertTrue($p->getAdditionalProperties());
- }
-
- public function testAddsItems()
- {
- $p = new Parameter(array(
- 'type' => 'array',
- 'items' => array('type' => 'string')
- ));
- $this->assertInstanceOf('Guzzle\Service\Description\Parameter', $p->getItems());
- $out = $p->toArray();
- $this->assertEquals('array', $out['type']);
- $this->assertInternalType('array', $out['items']);
- }
-
- public function testHasExtraProperties()
- {
- $p = new Parameter();
- $this->assertEquals(array(), $p->getData());
- $p->setData(array('foo' => 'bar'));
- $this->assertEquals('bar', $p->getData('foo'));
- $p->setData('baz', 'boo');
- $this->assertEquals(array('foo' => 'bar', 'baz' => 'boo'), $p->getData());
- }
-
- public function testCanRetrieveKnownPropertiesUsingDataMethod()
- {
- $p = new Parameter();
- $this->assertEquals(null, $p->getData('foo'));
- $p->setName('test');
- $this->assertEquals('test', $p->getData('name'));
- }
-
- public function testHasInstanceOf()
- {
- $p = new Parameter();
- $this->assertNull($p->getInstanceOf());
- $p->setInstanceOf('Foo');
- $this->assertEquals('Foo', $p->getInstanceOf());
- }
-
- public function testHasPattern()
- {
- $p = new Parameter();
- $this->assertNull($p->getPattern());
- $p->setPattern('/[0-9]+/');
- $this->assertEquals('/[0-9]+/', $p->getPattern());
- }
-
- public function testHasEnum()
- {
- $p = new Parameter();
- $this->assertNull($p->getEnum());
- $p->setEnum(array('foo', 'bar'));
- $this->assertEquals(array('foo', 'bar'), $p->getEnum());
- }
-
- public function testSerializesItems()
- {
- $p = new Parameter(array(
- 'type' => 'object',
- 'additionalProperties' => array('type' => 'string')
- ));
- $this->assertEquals(array(
- 'type' => 'object',
- 'additionalProperties' => array('type' => 'string')
- ), $p->toArray());
- }
-
- public function testResolvesRefKeysRecursively()
- {
- $description = new ServiceDescription(array(
- 'models' => array(
- 'JarJar' => array('type' => 'string', 'default' => 'Mesa address tha senate!'),
- 'Anakin' => array('type' => 'array', 'items' => array('$ref' => 'JarJar'))
- )
- ));
- $p = new Parameter(array('$ref' => 'Anakin', 'description' => 'added'), $description);
- $this->assertEquals(array(
- 'type' => 'array',
- 'items' => array('type' => 'string', 'default' => 'Mesa address tha senate!'),
- 'description' => 'added'
- ), $p->toArray());
- }
-
- public function testResolvesExtendsRecursively()
- {
- $jarJar = array('type' => 'string', 'default' => 'Mesa address tha senate!', 'description' => 'a');
- $anakin = array('type' => 'array', 'items' => array('extends' => 'JarJar', 'description' => 'b'));
- $description = new ServiceDescription(array(
- 'models' => array('JarJar' => $jarJar, 'Anakin' => $anakin)
- ));
- // Description attribute will be updated, and format added
- $p = new Parameter(array('extends' => 'Anakin', 'format' => 'date'), $description);
- $this->assertEquals(array(
- 'type' => 'array',
- 'format' => 'date',
- 'items' => array(
- 'type' => 'string',
- 'default' => 'Mesa address tha senate!',
- 'description' => 'b'
- )
- ), $p->toArray());
- }
-
- public function testHasKeyMethod()
- {
- $p = new Parameter(array('name' => 'foo', 'sentAs' => 'bar'));
- $this->assertEquals('bar', $p->getWireName());
- $p->setSentAs(null);
- $this->assertEquals('foo', $p->getWireName());
- }
-
- public function testIncludesNameInToArrayWhenItemsAttributeHasName()
- {
- $p = new Parameter(array(
- 'type' => 'array',
- 'name' => 'Abc',
- 'items' => array(
- 'name' => 'Foo',
- 'type' => 'object'
- )
- ));
- $result = $p->toArray();
- $this->assertEquals(array(
- 'type' => 'array',
- 'items' => array(
- 'name' => 'Foo',
- 'type' => 'object',
- 'additionalProperties' => true
- )
- ), $result);
- }
-
- public function dateTimeProvider()
- {
- $d = 'October 13, 2012 16:15:46 UTC';
-
- return array(
- array($d, 'date-time', '2012-10-13T16:15:46Z'),
- array($d, 'date', '2012-10-13'),
- array($d, 'timestamp', strtotime($d)),
- array(new \DateTime($d), 'timestamp', strtotime($d))
- );
- }
-
- /**
- * @dataProvider dateTimeProvider
- */
- public function testAppliesFormat($d, $format, $result)
- {
- $p = new Parameter();
- $p->setFormat($format);
- $this->assertEquals($format, $p->getFormat());
- $this->assertEquals($result, $p->filter($d));
- }
-}
diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Description/SchemaFormatterTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Description/SchemaFormatterTest.php
deleted file mode 100644
index eb3619bea55..00000000000
--- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Description/SchemaFormatterTest.php
+++ /dev/null
@@ -1,61 +0,0 @@
-assertEquals($result, SchemaFormatter::format($format, $value));
- }
-
- /**
- * @expectedException \Guzzle\Common\Exception\InvalidArgumentException
- */
- public function testValidatesDateTimeInput()
- {
- SchemaFormatter::format('date-time', false);
- }
-
- public function testEnsuresTimestampsAreIntegers()
- {
- $t = time();
- $result = SchemaFormatter::format('timestamp', $t);
- $this->assertSame($t, $result);
- $this->assertInternalType('int', $result);
- }
-}
diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Description/SchemaValidatorTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Description/SchemaValidatorTest.php
deleted file mode 100644
index 4d6cc872830..00000000000
--- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Description/SchemaValidatorTest.php
+++ /dev/null
@@ -1,326 +0,0 @@
-validator = new SchemaValidator();
- }
-
- public function testValidatesArrayListsAreNumericallyIndexed()
- {
- $value = array(array(1));
- $this->assertFalse($this->validator->validate($this->getComplexParam(), $value));
- $this->assertEquals(
- array('[Foo][0] must be an array of properties. Got a numerically indexed array.'),
- $this->validator->getErrors()
- );
- }
-
- public function testValidatesArrayListsContainProperItems()
- {
- $value = array(true);
- $this->assertFalse($this->validator->validate($this->getComplexParam(), $value));
- $this->assertEquals(
- array('[Foo][0] must be of type object'),
- $this->validator->getErrors()
- );
- }
-
- public function testAddsDefaultValuesInLists()
- {
- $value = array(array());
- $this->assertTrue($this->validator->validate($this->getComplexParam(), $value));
- $this->assertEquals(array(array('Bar' => true)), $value);
- }
-
- public function testMergesDefaultValuesInLists()
- {
- $value = array(
- array('Baz' => 'hello!'),
- array('Bar' => false)
- );
- $this->assertTrue($this->validator->validate($this->getComplexParam(), $value));
- $this->assertEquals(array(
- array(
- 'Baz' => 'hello!',
- 'Bar' => true
- ),
- array('Bar' => false)
- ), $value);
- }
-
- public function testCorrectlyConvertsParametersToArrayWhenArraysArePresent()
- {
- $param = $this->getComplexParam();
- $result = $param->toArray();
- $this->assertInternalType('array', $result['items']);
- $this->assertEquals('array', $result['type']);
- $this->assertInstanceOf('Guzzle\Service\Description\Parameter', $param->getItems());
- }
-
- public function testAllowsInstanceOf()
- {
- $p = new Parameter(array(
- 'name' => 'foo',
- 'type' => 'object',
- 'instanceOf' => get_class($this)
- ));
- $this->assertTrue($this->validator->validate($p, $this));
- $this->assertFalse($this->validator->validate($p, $p));
- $this->assertEquals(array('[foo] must be an instance of ' . __CLASS__), $this->validator->getErrors());
- }
-
- public function testEnforcesInstanceOfOnlyWhenObject()
- {
- $p = new Parameter(array(
- 'name' => 'foo',
- 'type' => array('object', 'string'),
- 'instanceOf' => get_class($this)
- ));
- $this->assertTrue($this->validator->validate($p, $this));
- $s = 'test';
- $this->assertTrue($this->validator->validate($p, $s));
- }
-
- public function testConvertsObjectsToArraysWhenToArrayInterface()
- {
- $o = $this->getMockBuilder('Guzzle\Common\ToArrayInterface')
- ->setMethods(array('toArray'))
- ->getMockForAbstractClass();
- $o->expects($this->once())
- ->method('toArray')
- ->will($this->returnValue(array(
- 'foo' => 'bar'
- )));
- $p = new Parameter(array(
- 'name' => 'test',
- 'type' => 'object',
- 'properties' => array(
- 'foo' => array('required' => 'true')
- )
- ));
- $this->assertTrue($this->validator->validate($p, $o));
- }
-
- public function testMergesValidationErrorsInPropertiesWithParent()
- {
- $p = new Parameter(array(
- 'name' => 'foo',
- 'type' => 'object',
- 'properties' => array(
- 'bar' => array('type' => 'string', 'required' => true, 'description' => 'This is what it does'),
- 'test' => array('type' => 'string', 'minLength' => 2, 'maxLength' => 5),
- 'test2' => array('type' => 'string', 'minLength' => 2, 'maxLength' => 2),
- 'test3' => array('type' => 'integer', 'minimum' => 100),
- 'test4' => array('type' => 'integer', 'maximum' => 10),
- 'test5' => array('type' => 'array', 'maxItems' => 2),
- 'test6' => array('type' => 'string', 'enum' => array('a', 'bc')),
- 'test7' => array('type' => 'string', 'pattern' => '/[0-9]+/'),
- 'test8' => array('type' => 'number'),
- 'baz' => array(
- 'type' => 'array',
- 'minItems' => 2,
- 'required' => true,
- "items" => array("type" => "string")
- )
- )
- ));
-
- $value = array(
- 'test' => 'a',
- 'test2' => 'abc',
- 'baz' => array(false),
- 'test3' => 10,
- 'test4' => 100,
- 'test5' => array(1, 3, 4),
- 'test6' => 'Foo',
- 'test7' => 'abc',
- 'test8' => 'abc'
- );
-
- $this->assertFalse($this->validator->validate($p, $value));
- $this->assertEquals(array (
- '[foo][bar] is a required string: This is what it does',
- '[foo][baz] must contain 2 or more elements',
- '[foo][baz][0] must be of type string',
- '[foo][test2] length must be less than or equal to 2',
- '[foo][test3] must be greater than or equal to 100',
- '[foo][test4] must be less than or equal to 10',
- '[foo][test5] must contain 2 or fewer elements',
- '[foo][test6] must be one of "a" or "bc"',
- '[foo][test7] must match the following regular expression: /[0-9]+/',
- '[foo][test8] must be of type number',
- '[foo][test] length must be greater than or equal to 2',
- ), $this->validator->getErrors());
- }
-
- public function testHandlesNullValuesInArraysWithDefaults()
- {
- $p = new Parameter(array(
- 'name' => 'foo',
- 'type' => 'object',
- 'required' => true,
- 'properties' => array(
- 'bar' => array(
- 'type' => 'object',
- 'required' => true,
- 'properties' => array(
- 'foo' => array('default' => 'hi')
- )
- )
- )
- ));
- $value = array();
- $this->assertTrue($this->validator->validate($p, $value));
- $this->assertEquals(array('bar' => array('foo' => 'hi')), $value);
- }
-
- public function testFailsWhenNullValuesInArraysWithNoDefaults()
- {
- $p = new Parameter(array(
- 'name' => 'foo',
- 'type' => 'object',
- 'required' => true,
- 'properties' => array(
- 'bar' => array(
- 'type' => 'object',
- 'required' => true,
- 'properties' => array('foo' => array('type' => 'string'))
- )
- )
- ));
- $value = array();
- $this->assertFalse($this->validator->validate($p, $value));
- $this->assertEquals(array('[foo][bar] is a required object'), $this->validator->getErrors());
- }
-
- public function testChecksTypes()
- {
- $p = new SchemaValidator();
- $r = new \ReflectionMethod($p, 'determineType');
- $r->setAccessible(true);
- $this->assertEquals('any', $r->invoke($p, 'any', 'hello'));
- $this->assertEquals(false, $r->invoke($p, 'foo', 'foo'));
- $this->assertEquals('string', $r->invoke($p, 'string', 'hello'));
- $this->assertEquals(false, $r->invoke($p, 'string', false));
- $this->assertEquals('integer', $r->invoke($p, 'integer', 1));
- $this->assertEquals(false, $r->invoke($p, 'integer', 'abc'));
- $this->assertEquals('numeric', $r->invoke($p, 'numeric', 1));
- $this->assertEquals('numeric', $r->invoke($p, 'numeric', '1'));
- $this->assertEquals('number', $r->invoke($p, 'number', 1));
- $this->assertEquals('number', $r->invoke($p, 'number', '1'));
- $this->assertEquals(false, $r->invoke($p, 'numeric', 'a'));
- $this->assertEquals('boolean', $r->invoke($p, 'boolean', true));
- $this->assertEquals('boolean', $r->invoke($p, 'boolean', false));
- $this->assertEquals(false, $r->invoke($p, 'boolean', 'false'));
- $this->assertEquals('null', $r->invoke($p, 'null', null));
- $this->assertEquals(false, $r->invoke($p, 'null', 'abc'));
- $this->assertEquals('array', $r->invoke($p, 'array', array()));
- $this->assertEquals(false, $r->invoke($p, 'array', 'foo'));
- }
-
- public function testValidatesFalseAdditionalProperties()
- {
- $param = new Parameter(array(
- 'name' => 'foo',
- 'type' => 'object',
- 'properties' => array('bar' => array('type' => 'string')),
- 'additionalProperties' => false
- ));
- $value = array('test' => '123');
- $this->assertFalse($this->validator->validate($param, $value));
- $this->assertEquals(array('[foo][test] is not an allowed property'), $this->validator->getErrors());
- $value = array('bar' => '123');
- $this->assertTrue($this->validator->validate($param, $value));
- }
-
- public function testAllowsUndefinedAdditionalProperties()
- {
- $param = new Parameter(array(
- 'name' => 'foo',
- 'type' => 'object',
- 'properties' => array('bar' => array('type' => 'string'))
- ));
- $value = array('test' => '123');
- $this->assertTrue($this->validator->validate($param, $value));
- }
-
- public function testValidatesAdditionalProperties()
- {
- $param = new Parameter(array(
- 'name' => 'foo',
- 'type' => 'object',
- 'properties' => array('bar' => array('type' => 'string')),
- 'additionalProperties' => array('type' => 'integer')
- ));
- $value = array('test' => 'foo');
- $this->assertFalse($this->validator->validate($param, $value));
- $this->assertEquals(array('[foo][test] must be of type integer'), $this->validator->getErrors());
- }
-
- public function testValidatesAdditionalPropertiesThatArrayArrays()
- {
- $param = new Parameter(array(
- 'name' => 'foo',
- 'type' => 'object',
- 'additionalProperties' => array(
- 'type' => 'array',
- 'items' => array('type' => 'string')
- )
- ));
- $value = array('test' => array(true));
- $this->assertFalse($this->validator->validate($param, $value));
- $this->assertEquals(array('[foo][test][0] must be of type string'), $this->validator->getErrors());
- }
-
- public function testIntegersCastToStringWhenTypeMismatch()
- {
- $param = new Parameter(array('name' => 'test', 'type' => 'string'));
- $value = 12;
- $this->assertTrue($this->validator->validate($param, $value));
- $this->assertEquals('12', $value);
- }
-
- public function testRequiredMessageIncludesType()
- {
- $param = new Parameter(array('name' => 'test', 'type' => array('string', 'boolean'), 'required' => true));
- $value = null;
- $this->assertFalse($this->validator->validate($param, $value));
- $this->assertEquals(array('[test] is a required string or boolean'), $this->validator->getErrors());
- }
-
- protected function getComplexParam()
- {
- return new Parameter(array(
- 'name' => 'Foo',
- 'type' => 'array',
- 'required' => true,
- 'min' => 1,
- 'items' => array(
- 'type' => 'object',
- 'properties' => array(
- 'Baz' => array(
- 'type' => 'string',
- ),
- 'Bar' => array(
- 'required' => true,
- 'type' => 'boolean',
- 'default' => true
- )
- )
- )
- ));
- }
-}
diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Description/ServiceDescriptionLoaderTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Description/ServiceDescriptionLoaderTest.php
deleted file mode 100644
index bbfd1d6dfce..00000000000
--- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Description/ServiceDescriptionLoaderTest.php
+++ /dev/null
@@ -1,177 +0,0 @@
- true,
- 'baz' => array('bar'),
- 'apiVersion' => '123',
- 'operations' => array()
- ));
-
- $this->assertEquals(true, $d->getData('foo'));
- $this->assertEquals(array('bar'), $d->getData('baz'));
- $this->assertEquals('123', $d->getApiVersion());
- }
-
- public function testAllowsDeepNestedInheritance()
- {
- $d = ServiceDescription::factory(array(
- 'operations' => array(
- 'abstract' => array(
- 'httpMethod' => 'HEAD',
- 'parameters' => array(
- 'test' => array('type' => 'string', 'required' => true)
- )
- ),
- 'abstract2' => array('uri' => '/test', 'extends' => 'abstract'),
- 'concrete' => array('extends' => 'abstract2'),
- 'override' => array('extends' => 'abstract', 'httpMethod' => 'PUT'),
- 'override2' => array('extends' => 'override', 'httpMethod' => 'POST', 'uri' => '/')
- )
- ));
-
- $c = $d->getOperation('concrete');
- $this->assertEquals('/test', $c->getUri());
- $this->assertEquals('HEAD', $c->getHttpMethod());
- $params = $c->getParams();
- $param = $params['test'];
- $this->assertEquals('string', $param->getType());
- $this->assertTrue($param->getRequired());
-
- // Ensure that merging HTTP method does not make an array
- $this->assertEquals('PUT', $d->getOperation('override')->getHttpMethod());
- $this->assertEquals('POST', $d->getOperation('override2')->getHttpMethod());
- $this->assertEquals('/', $d->getOperation('override2')->getUri());
- }
-
- /**
- * @expectedException RuntimeException
- */
- public function testThrowsExceptionWhenExtendingMissingCommand()
- {
- ServiceDescription::factory(array(
- 'operations' => array(
- 'concrete' => array(
- 'extends' => 'missing'
- )
- )
- ));
- }
-
- public function testAllowsMultipleInheritance()
- {
- $description = ServiceDescription::factory(array(
- 'operations' => array(
- 'a' => array(
- 'httpMethod' => 'GET',
- 'parameters' => array(
- 'a1' => array(
- 'default' => 'foo',
- 'required' => true,
- 'prepend' => 'hi'
- )
- )
- ),
- 'b' => array(
- 'extends' => 'a',
- 'parameters' => array(
- 'b2' => array()
- )
- ),
- 'c' => array(
- 'parameters' => array(
- 'a1' => array(
- 'default' => 'bar',
- 'required' => true,
- 'description' => 'test'
- ),
- 'c3' => array()
- )
- ),
- 'd' => array(
- 'httpMethod' => 'DELETE',
- 'extends' => array('b', 'c'),
- 'parameters' => array(
- 'test' => array()
- )
- )
- )
- ));
-
- $command = $description->getOperation('d');
- $this->assertEquals('DELETE', $command->getHttpMethod());
- $this->assertContains('a1', $command->getParamNames());
- $this->assertContains('b2', $command->getParamNames());
- $this->assertContains('c3', $command->getParamNames());
- $this->assertContains('test', $command->getParamNames());
-
- $this->assertTrue($command->getParam('a1')->getRequired());
- $this->assertEquals('bar', $command->getParam('a1')->getDefault());
- $this->assertEquals('test', $command->getParam('a1')->getDescription());
- }
-
- public function testAddsOtherFields()
- {
- $description = ServiceDescription::factory(array(
- 'operations' => array(),
- 'description' => 'Foo',
- 'apiVersion' => 'bar'
- ));
- $this->assertEquals('Foo', $description->getDescription());
- $this->assertEquals('bar', $description->getApiVersion());
- }
-
- public function testCanLoadNestedExtends()
- {
- $description = ServiceDescription::factory(array(
- 'operations' => array(
- 'root' => array(
- 'class' => 'foo'
- ),
- 'foo' => array(
- 'extends' => 'root',
- 'parameters' => array(
- 'baz' => array('type' => 'string')
- )
- ),
- 'foo_2' => array(
- 'extends' => 'foo',
- 'parameters' => array(
- 'bar' => array('type' => 'string')
- )
- ),
- 'foo_3' => array(
- 'class' => 'bar',
- 'parameters' => array(
- 'bar2' => array('type' => 'string')
- )
- ),
- 'foo_4' => array(
- 'extends' => array('foo_2', 'foo_3'),
- 'parameters' => array(
- 'bar3' => array('type' => 'string')
- )
- )
- )
- ));
-
- $this->assertTrue($description->hasOperation('foo_4'));
- $foo4 = $description->getOperation('foo_4');
- $this->assertTrue($foo4->hasParam('baz'));
- $this->assertTrue($foo4->hasParam('bar'));
- $this->assertTrue($foo4->hasParam('bar2'));
- $this->assertTrue($foo4->hasParam('bar3'));
- $this->assertEquals('bar', $foo4->getClass());
- }
-}
diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Description/ServiceDescriptionTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Description/ServiceDescriptionTest.php
deleted file mode 100644
index ff25452357e..00000000000
--- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Description/ServiceDescriptionTest.php
+++ /dev/null
@@ -1,240 +0,0 @@
-serviceData = array(
- 'test_command' => new Operation(array(
- 'name' => 'test_command',
- 'description' => 'documentationForCommand',
- 'httpMethod' => 'DELETE',
- 'class' => 'Guzzle\\Tests\\Service\\Mock\\Command\\MockCommand',
- 'parameters' => array(
- 'bucket' => array('required' => true),
- 'key' => array('required' => true)
- )
- ))
- );
- }
-
- /**
- * @covers Guzzle\Service\Description\ServiceDescription::factory
- * @covers Guzzle\Service\Description\ServiceDescriptionLoader::build
- */
- public function testFactoryDelegatesToConcreteFactories()
- {
- $jsonFile = __DIR__ . '/../../TestData/test_service.json';
- $this->assertInstanceOf('Guzzle\Service\Description\ServiceDescription', ServiceDescription::factory($jsonFile));
- }
-
- public function testConstructor()
- {
- $service = new ServiceDescription(array('operations' => $this->serviceData));
- $this->assertEquals(1, count($service->getOperations()));
- $this->assertFalse($service->hasOperation('foobar'));
- $this->assertTrue($service->hasOperation('test_command'));
- }
-
- public function testIsSerializable()
- {
- $service = new ServiceDescription(array('operations' => $this->serviceData));
- $data = serialize($service);
- $d2 = unserialize($data);
- $this->assertEquals(serialize($service), serialize($d2));
- }
-
- public function testSerializesParameters()
- {
- $service = new ServiceDescription(array(
- 'operations' => array(
- 'foo' => new Operation(array('parameters' => array('foo' => array('type' => 'string'))))
- )
- ));
- $serialized = serialize($service);
- $this->assertContains('"parameters":{"foo":', $serialized);
- $service = unserialize($serialized);
- $this->assertTrue($service->getOperation('foo')->hasParam('foo'));
- }
-
- public function testAllowsForJsonBasedArrayParamsFunctionalTest()
- {
- $description = new ServiceDescription(array(
- 'operations' => array(
- 'test' => new Operation(array(
- 'httpMethod' => 'PUT',
- 'parameters' => array(
- 'data' => array(
- 'required' => true,
- 'filters' => 'json_encode',
- 'location' => 'body'
- )
- )
- ))
- )
- ));
- $client = new Client();
- $client->setDescription($description);
- $command = $client->getCommand('test', array(
- 'data' => array(
- 'foo' => 'bar'
- )
- ));
-
- $request = $command->prepare();
- $this->assertEquals('{"foo":"bar"}', (string) $request->getBody());
- }
-
- public function testContainsModels()
- {
- $d = new ServiceDescription(array(
- 'operations' => array('foo' => array()),
- 'models' => array(
- 'Tag' => array('type' => 'object'),
- 'Person' => array('type' => 'object')
- )
- ));
- $this->assertTrue($d->hasModel('Tag'));
- $this->assertTrue($d->hasModel('Person'));
- $this->assertFalse($d->hasModel('Foo'));
- $this->assertInstanceOf('Guzzle\Service\Description\Parameter', $d->getModel('Tag'));
- $this->assertNull($d->getModel('Foo'));
- $this->assertContains('"models":{', serialize($d));
- $this->assertEquals(array('Tag', 'Person'), array_keys($d->getModels()));
- }
-
- public function testCanAddModels()
- {
- $d = new ServiceDescription(array());
- $this->assertFalse($d->hasModel('Foo'));
- $d->addModel(new Parameter(array('name' => 'Foo')));
- $this->assertTrue($d->hasModel('Foo'));
- }
-
- public function testHasAttributes()
- {
- $d = new ServiceDescription(array(
- 'operations' => array(),
- 'name' => 'Name',
- 'description' => 'Description',
- 'apiVersion' => '1.24'
- ));
-
- $this->assertEquals('Name', $d->getName());
- $this->assertEquals('Description', $d->getDescription());
- $this->assertEquals('1.24', $d->getApiVersion());
-
- $s = serialize($d);
- $this->assertContains('"name":"Name"', $s);
- $this->assertContains('"description":"Description"', $s);
- $this->assertContains('"apiVersion":"1.24"', $s);
-
- $d = unserialize($s);
- $this->assertEquals('Name', $d->getName());
- $this->assertEquals('Description', $d->getDescription());
- $this->assertEquals('1.24', $d->getApiVersion());
- }
-
- public function testPersistsCustomAttributes()
- {
- $data = array(
- 'operations' => array('foo' => array('class' => 'foo', 'parameters' => array())),
- 'name' => 'Name',
- 'description' => 'Test',
- 'apiVersion' => '1.24',
- 'auth' => 'foo',
- 'keyParam' => 'bar'
- );
- $d = new ServiceDescription($data);
- $d->setData('hello', 'baz');
- $this->assertEquals('foo', $d->getData('auth'));
- $this->assertEquals('baz', $d->getData('hello'));
- $this->assertEquals('bar', $d->getData('keyParam'));
- // responseClass and responseType are added by default
- $data['operations']['foo']['responseClass'] = 'array';
- $data['operations']['foo']['responseType'] = 'primitive';
- $this->assertEquals($data + array('hello' => 'baz'), json_decode($d->serialize(), true));
- }
-
- public function testHasToArray()
- {
- $data = array(
- 'operations' => array(),
- 'name' => 'Name',
- 'description' => 'Test'
- );
- $d = new ServiceDescription($data);
- $arr = $d->toArray();
- $this->assertEquals('Name', $arr['name']);
- $this->assertEquals('Test', $arr['description']);
- }
-
- public function testReturnsNullWhenRetrievingMissingOperation()
- {
- $s = new ServiceDescription(array());
- $this->assertNull($s->getOperation('foo'));
- }
-
- public function testCanAddOperations()
- {
- $s = new ServiceDescription(array());
- $this->assertFalse($s->hasOperation('Foo'));
- $s->addOperation(new Operation(array('name' => 'Foo')));
- $this->assertTrue($s->hasOperation('Foo'));
- }
-
- /**
- * @expectedException Guzzle\Common\Exception\InvalidArgumentException
- */
- public function testValidatesOperationTypes()
- {
- $s = new ServiceDescription(array(
- 'operations' => array('foo' => new \stdClass())
- ));
- }
-
- public function testHasBaseUrl()
- {
- $description = new ServiceDescription(array('baseUrl' => 'http://foo.com'));
- $this->assertEquals('http://foo.com', $description->getBaseUrl());
- $description->setBaseUrl('http://foobar.com');
- $this->assertEquals('http://foobar.com', $description->getBaseUrl());
- }
-
- public function testCanUseBasePath()
- {
- $description = new ServiceDescription(array('basePath' => 'http://foo.com'));
- $this->assertEquals('http://foo.com', $description->getBaseUrl());
- }
-
- public function testModelsHaveNames()
- {
- $desc = array(
- 'models' => array(
- 'date' => array('type' => 'string'),
- 'user'=> array(
- 'type' => 'object',
- 'properties' => array(
- 'dob' => array('$ref' => 'date')
- )
- )
- )
- );
-
- $s = ServiceDescription::factory($desc);
- $this->assertEquals('date', $s->getModel('date')->getName());
- $this->assertEquals('dob', $s->getModel('user')->getProperty('dob')->getName());
- }
-}
diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Exception/CommandTransferExceptionTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Exception/CommandTransferExceptionTest.php
deleted file mode 100644
index be0d4ac8b99..00000000000
--- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Exception/CommandTransferExceptionTest.php
+++ /dev/null
@@ -1,66 +0,0 @@
-addSuccessfulCommand($c1)->addFailedCommand($c2);
- $this->assertSame(array($c1), $e->getSuccessfulCommands());
- $this->assertSame(array($c2), $e->getFailedCommands());
- $this->assertSame(array($c1, $c2), $e->getAllCommands());
- }
-
- public function testConvertsMultiExceptionIntoCommandTransfer()
- {
- $r1 = new Request('GET', 'http://foo.com');
- $r2 = new Request('GET', 'http://foobaz.com');
- $e = new MultiTransferException('Test', 123);
- $e->addSuccessfulRequest($r1)->addFailedRequest($r2);
- $ce = CommandTransferException::fromMultiTransferException($e);
-
- $this->assertInstanceOf('Guzzle\Service\Exception\CommandTransferException', $ce);
- $this->assertEquals('Test', $ce->getMessage());
- $this->assertEquals(123, $ce->getCode());
- $this->assertSame(array($r1), $ce->getSuccessfulRequests());
- $this->assertSame(array($r2), $ce->getFailedRequests());
- }
-
- public function testCanRetrieveExceptionForCommand()
- {
- $r1 = new Request('GET', 'http://foo.com');
- $e1 = new \Exception('foo');
- $c1 = $this->getMockBuilder('Guzzle\Tests\Service\Mock\Command\MockCommand')
- ->setMethods(array('getRequest'))
- ->getMock();
- $c1->expects($this->once())->method('getRequest')->will($this->returnValue($r1));
-
- $e = new MultiTransferException('Test', 123);
- $e->addFailedRequestWithException($r1, $e1);
- $ce = CommandTransferException::fromMultiTransferException($e);
- $ce->addFailedCommand($c1);
-
- $this->assertSame($e1, $ce->getExceptionForFailedCommand($c1));
- }
-
- public function testAddsNonRequestExceptions()
- {
- $e = new MultiTransferException();
- $e->add(new \Exception('bar'));
- $e->addFailedRequestWithException(new Request('GET', 'http://www.foo.com'), new \Exception('foo'));
- $ce = CommandTransferException::fromMultiTransferException($e);
- $this->assertEquals(2, count($ce));
- }
-}
diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Exception/InconsistentClientTransferExceptionTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Exception/InconsistentClientTransferExceptionTest.php
deleted file mode 100644
index 6455295ad7c..00000000000
--- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Exception/InconsistentClientTransferExceptionTest.php
+++ /dev/null
@@ -1,15 +0,0 @@
-assertEquals($items, $e->getCommands());
- }
-}
diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Exception/ValidationExceptionTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Exception/ValidationExceptionTest.php
deleted file mode 100644
index ef789d8a950..00000000000
--- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Exception/ValidationExceptionTest.php
+++ /dev/null
@@ -1,17 +0,0 @@
-setErrors($errors);
- $this->assertEquals($errors, $e->getErrors());
- }
-}
diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Mock/Command/IterableCommand.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Mock/Command/IterableCommand.php
deleted file mode 100644
index 4ab423e8538..00000000000
--- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Mock/Command/IterableCommand.php
+++ /dev/null
@@ -1,31 +0,0 @@
- 'iterable_command',
- 'parameters' => array(
- 'page_size' => array('type' => 'integer'),
- 'next_token' => array('type' => 'string')
- )
- ));
- }
-
- protected function build()
- {
- $this->request = $this->client->createRequest('GET');
-
- // Add the next token and page size query string values
- $this->request->getQuery()->set('next_token', $this->get('next_token'));
-
- if ($this->get('page_size')) {
- $this->request->getQuery()->set('page_size', $this->get('page_size'));
- }
- }
-}
diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Mock/Command/MockCommand.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Mock/Command/MockCommand.php
deleted file mode 100644
index 831a7e7956d..00000000000
--- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Mock/Command/MockCommand.php
+++ /dev/null
@@ -1,32 +0,0 @@
- get_called_class() == __CLASS__ ? 'mock_command' : 'sub.sub',
- 'httpMethod' => 'POST',
- 'parameters' => array(
- 'test' => array(
- 'default' => 123,
- 'required' => true,
- 'doc' => 'Test argument'
- ),
- '_internal' => array(
- 'default' => 'abc'
- ),
- 'foo' => array('filters' => array('strtoupper'))
- )
- ));
- }
-
- protected function build()
- {
- $this->request = $this->client->createRequest();
- }
-}
diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Mock/Command/OtherCommand.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Mock/Command/OtherCommand.php
deleted file mode 100644
index 72ae1f6a70f..00000000000
--- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Mock/Command/OtherCommand.php
+++ /dev/null
@@ -1,30 +0,0 @@
- 'other_command',
- 'parameters' => array(
- 'test' => array(
- 'default' => '123',
- 'required' => true,
- 'doc' => 'Test argument'
- ),
- 'other' => array(),
- 'arg' => array('type' => 'string'),
- 'static' => array('static' => true, 'default' => 'this is static')
- )
- ));
- }
-
- protected function build()
- {
- $this->request = $this->client->getRequest('HEAD');
- }
-}
diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Mock/Command/Sub/Sub.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Mock/Command/Sub/Sub.php
deleted file mode 100644
index d348480cfb3..00000000000
--- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Mock/Command/Sub/Sub.php
+++ /dev/null
@@ -1,7 +0,0 @@
- '{scheme}://127.0.0.1:8124/{api_version}/{subdomain}',
- 'scheme' => 'http',
- 'api_version' => 'v1'
- ), array('username', 'password', 'subdomain'));
-
- return new self($config->get('base_url'), $config);
- }
-}
diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Mock/Model/MockCommandIterator.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Mock/Model/MockCommandIterator.php
deleted file mode 100644
index 8faf4123a48..00000000000
--- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Mock/Model/MockCommandIterator.php
+++ /dev/null
@@ -1,42 +0,0 @@
-nextToken) {
- $this->command->set('next_token', $this->nextToken);
- }
-
- $this->command->set('page_size', (int) $this->calculatePageSize());
- $this->command->execute();
-
- $data = json_decode($this->command->getResponse()->getBody(true), true);
-
- $this->nextToken = $data['next_token'];
-
- return $data['resources'];
- }
-
- public function next()
- {
- $this->calledNext++;
- parent::next();
- }
-
- public function getResources()
- {
- return $this->resources;
- }
-
- public function getIteratedCount()
- {
- return $this->iteratedCount;
- }
-}
diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Resource/CompositeResourceIteratorFactoryTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Resource/CompositeResourceIteratorFactoryTest.php
deleted file mode 100644
index 41c20737246..00000000000
--- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Resource/CompositeResourceIteratorFactoryTest.php
+++ /dev/null
@@ -1,37 +0,0 @@
-assertFalse($factory->canBuild($cmd));
- $factory->build($cmd);
- }
-
- public function testBuildsResourceIterators()
- {
- $f1 = new ResourceIteratorClassFactory('Guzzle\Tests\Service\Mock\Model');
- $factory = new CompositeResourceIteratorFactory(array());
- $factory->addFactory($f1);
- $command = new MockCommand();
- $iterator = $factory->build($command, array('client.namespace' => 'Guzzle\Tests\Service\Mock'));
- $this->assertInstanceOf('Guzzle\Tests\Service\Mock\Model\MockCommandIterator', $iterator);
- }
-}
diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Resource/MapResourceIteratorFactoryTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Resource/MapResourceIteratorFactoryTest.php
deleted file mode 100644
index d166e9261b7..00000000000
--- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Resource/MapResourceIteratorFactoryTest.php
+++ /dev/null
@@ -1,40 +0,0 @@
-build(new MockCommand());
- }
-
- public function testBuildsResourceIterators()
- {
- $factory = new MapResourceIteratorFactory(array(
- 'mock_command' => 'Guzzle\Tests\Service\Mock\Model\MockCommandIterator'
- ));
- $iterator = $factory->build(new MockCommand());
- $this->assertInstanceOf('Guzzle\Tests\Service\Mock\Model\MockCommandIterator', $iterator);
- }
-
- public function testUsesWildcardMappings()
- {
- $factory = new MapResourceIteratorFactory(array(
- '*' => 'Guzzle\Tests\Service\Mock\Model\MockCommandIterator'
- ));
- $iterator = $factory->build(new MockCommand());
- $this->assertInstanceOf('Guzzle\Tests\Service\Mock\Model\MockCommandIterator', $iterator);
- }
-}
diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Resource/ModelTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Resource/ModelTest.php
deleted file mode 100644
index 7214133e5f8..00000000000
--- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Resource/ModelTest.php
+++ /dev/null
@@ -1,65 +0,0 @@
- 'object'));
- $model = new Model(array('foo' => 'bar'), $param);
- $this->assertSame($param, $model->getStructure());
- $this->assertEquals('bar', $model->get('foo'));
- $this->assertEquals('bar', $model['foo']);
- }
-
- public function testCanBeUsedWithoutStructure()
- {
- $model = new Model(array(
- 'Foo' => 'baz',
- 'Bar' => array(
- 'Boo' => 'Bam'
- )
- ));
- $transform = function ($key, $value) {
- return ($value && is_array($value)) ? new Collection($value) : $value;
- };
- $model = $model->map($transform);
- $this->assertInstanceOf('Guzzle\Common\Collection', $model->getPath('Bar'));
- }
-
- public function testAllowsFiltering()
- {
- $model = new Model(array(
- 'Foo' => 'baz',
- 'Bar' => 'a'
- ));
- $model = $model->filter(function ($i, $v) {
- return $v[0] == 'a';
- });
- $this->assertEquals(array('Bar' => 'a'), $model->toArray());
- }
-
- public function testDoesNotIncludeEmptyStructureInString()
- {
- $model = new Model(array('Foo' => 'baz'));
- $str = (string) $model;
- $this->assertContains('Debug output of model', $str);
- $this->assertNotContains('Model structure', $str);
- }
-
- public function testDoesIncludeModelStructureInString()
- {
- $model = new Model(array('Foo' => 'baz'), new Parameter(array('name' => 'Foo')));
- $str = (string) $model;
- $this->assertContains('Debug output of Foo model', $str);
- $this->assertContains('Model structure', $str);
- }
-}
diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Resource/ResourceIteratorClassFactoryTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Resource/ResourceIteratorClassFactoryTest.php
deleted file mode 100644
index 7b061b5373c..00000000000
--- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Resource/ResourceIteratorClassFactoryTest.php
+++ /dev/null
@@ -1,41 +0,0 @@
-registerNamespace('Baz');
- $command = new MockCommand();
- $factory->build($command);
- }
-
- public function testBuildsResourceIterators()
- {
- $factory = new ResourceIteratorClassFactory('Guzzle\Tests\Service\Mock\Model');
- $command = new MockCommand();
- $iterator = $factory->build($command, array('client.namespace' => 'Guzzle\Tests\Service\Mock'));
- $this->assertInstanceOf('Guzzle\Tests\Service\Mock\Model\MockCommandIterator', $iterator);
- }
-
- public function testChecksIfCanBuild()
- {
- $factory = new ResourceIteratorClassFactory('Guzzle\Tests\Service');
- $this->assertFalse($factory->canBuild(new MockCommand()));
- $factory = new ResourceIteratorClassFactory('Guzzle\Tests\Service\Mock\Model');
- $this->assertTrue($factory->canBuild(new MockCommand()));
- }
-}
diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Resource/ResourceIteratorTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Resource/ResourceIteratorTest.php
deleted file mode 100644
index 573fb6d6e3a..00000000000
--- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Resource/ResourceIteratorTest.php
+++ /dev/null
@@ -1,184 +0,0 @@
-assertInternalType('array', ResourceIterator::getAllEvents());
- }
-
- public function testConstructorConfiguresDefaults()
- {
- $ri = $this->getMockForAbstractClass('Guzzle\\Service\\Resource\\ResourceIterator', array(
- $this->getServiceBuilder()->get('mock')->getCommand('iterable_command'),
- array(
- 'limit' => 10,
- 'page_size' => 3
- )
- ), 'MockIterator');
-
- $this->assertEquals(false, $ri->getNextToken());
- $this->assertEquals(false, $ri->current());
- }
-
- public function testSendsRequestsForNextSetOfResources()
- {
- // Queue up an array of responses for iterating
- $this->getServer()->flush();
- $this->getServer()->enqueue(array(
- "HTTP/1.1 200 OK\r\nContent-Length: 52\r\n\r\n{ \"next_token\": \"g\", \"resources\": [\"d\", \"e\", \"f\"] }",
- "HTTP/1.1 200 OK\r\nContent-Length: 52\r\n\r\n{ \"next_token\": \"j\", \"resources\": [\"g\", \"h\", \"i\"] }",
- "HTTP/1.1 200 OK\r\nContent-Length: 41\r\n\r\n{ \"next_token\": \"\", \"resources\": [\"j\"] }"
- ));
-
- // Create a new resource iterator using the IterableCommand mock
- $ri = new MockCommandIterator($this->getServiceBuilder()->get('mock')->getCommand('iterable_command'), array(
- 'page_size' => 3
- ));
-
- // Ensure that no requests have been sent yet
- $this->assertEquals(0, count($this->getServer()->getReceivedRequests(false)));
-
- //$this->assertEquals(array('d', 'e', 'f', 'g', 'h', 'i', 'j'), $ri->toArray());
- $ri->toArray();
- $requests = $this->getServer()->getReceivedRequests(true);
- $this->assertEquals(3, count($requests));
-
- $this->assertEquals(3, $requests[0]->getQuery()->get('page_size'));
- $this->assertEquals(3, $requests[1]->getQuery()->get('page_size'));
- $this->assertEquals(3, $requests[2]->getQuery()->get('page_size'));
-
- // Reset and resend
- $this->getServer()->flush();
- $this->getServer()->enqueue(array(
- "HTTP/1.1 200 OK\r\nContent-Length: 52\r\n\r\n{ \"next_token\": \"g\", \"resources\": [\"d\", \"e\", \"f\"] }",
- "HTTP/1.1 200 OK\r\nContent-Length: 52\r\n\r\n{ \"next_token\": \"j\", \"resources\": [\"g\", \"h\", \"i\"] }",
- "HTTP/1.1 200 OK\r\nContent-Length: 41\r\n\r\n{ \"next_token\": \"\", \"resources\": [\"j\"] }",
- ));
-
- $d = array();
- foreach ($ri as $data) {
- $d[] = $data;
- }
- $this->assertEquals(array('d', 'e', 'f', 'g', 'h', 'i', 'j'), $d);
- }
-
- public function testCalculatesPageSize()
- {
- $this->getServer()->flush();
- $this->getServer()->enqueue(array(
- "HTTP/1.1 200 OK\r\nContent-Length: 52\r\n\r\n{ \"next_token\": \"g\", \"resources\": [\"d\", \"e\", \"f\"] }",
- "HTTP/1.1 200 OK\r\nContent-Length: 52\r\n\r\n{ \"next_token\": \"j\", \"resources\": [\"g\", \"h\", \"i\"] }",
- "HTTP/1.1 200 OK\r\nContent-Length: 52\r\n\r\n{ \"next_token\": \"j\", \"resources\": [\"j\", \"k\"] }"
- ));
-
- $ri = new MockCommandIterator($this->getServiceBuilder()->get('mock')->getCommand('iterable_command'), array(
- 'page_size' => 3,
- 'limit' => 7
- ));
-
- $this->assertEquals(array('d', 'e', 'f', 'g', 'h', 'i', 'j'), $ri->toArray());
- $requests = $this->getServer()->getReceivedRequests(true);
- $this->assertEquals(3, count($requests));
- $this->assertEquals(3, $requests[0]->getQuery()->get('page_size'));
- $this->assertEquals(3, $requests[1]->getQuery()->get('page_size'));
- $this->assertEquals(1, $requests[2]->getQuery()->get('page_size'));
- }
-
- public function testUseAsArray()
- {
- $this->getServer()->flush();
- $this->getServer()->enqueue(array(
- "HTTP/1.1 200 OK\r\nContent-Length: 52\r\n\r\n{ \"next_token\": \"g\", \"resources\": [\"d\", \"e\", \"f\"] }",
- "HTTP/1.1 200 OK\r\nContent-Length: 52\r\n\r\n{ \"next_token\": \"\", \"resources\": [\"g\", \"h\", \"i\"] }"
- ));
-
- $ri = new MockCommandIterator($this->getServiceBuilder()->get('mock')->getCommand('iterable_command'));
-
- // Ensure that the key is never < 0
- $this->assertEquals(0, $ri->key());
- $this->assertEquals(0, count($ri));
-
- // Ensure that the iterator can be used as KVP array
- $data = array();
- foreach ($ri as $key => $value) {
- $data[$key] = $value;
- }
-
- // Ensure that the iterate is countable
- $this->assertEquals(6, count($ri));
- $this->assertEquals(array('d', 'e', 'f', 'g', 'h', 'i'), $data);
- }
-
- public function testBailsWhenSendReturnsNoResults()
- {
- $this->getServer()->flush();
- $this->getServer()->enqueue(array(
- "HTTP/1.1 200 OK\r\n\r\n{ \"next_token\": \"g\", \"resources\": [\"d\", \"e\", \"f\"] }",
- "HTTP/1.1 200 OK\r\n\r\n{ \"next_token\": \"\", \"resources\": [] }"
- ));
-
- $ri = new MockCommandIterator($this->getServiceBuilder()->get('mock')->getCommand('iterable_command'));
-
- // Ensure that the iterator can be used as KVP array
- $data = $ri->toArray();
-
- // Ensure that the iterate is countable
- $this->assertEquals(3, count($ri));
- $this->assertEquals(array('d', 'e', 'f'), $data);
-
- $this->assertEquals(2, $ri->getRequestCount());
- }
-
- public function testHoldsDataOptions()
- {
- $ri = new MockCommandIterator($this->getServiceBuilder()->get('mock')->getCommand('iterable_command'));
- $this->assertNull($ri->get('foo'));
- $this->assertSame($ri, $ri->set('foo', 'bar'));
- $this->assertEquals('bar', $ri->get('foo'));
- }
-
- public function testSettingLimitOrPageSizeClearsData()
- {
- $this->getServer()->flush();
- $this->getServer()->enqueue(array(
- "HTTP/1.1 200 OK\r\n\r\n{ \"next_token\": \"\", \"resources\": [\"d\", \"e\", \"f\"] }",
- "HTTP/1.1 200 OK\r\n\r\n{ \"next_token\": \"\", \"resources\": [\"d\", \"e\", \"f\"] }",
- "HTTP/1.1 200 OK\r\n\r\n{ \"next_token\": \"\", \"resources\": [\"d\", \"e\", \"f\"] }"
- ));
-
- $ri = new MockCommandIterator($this->getServiceBuilder()->get('mock')->getCommand('iterable_command'));
- $ri->toArray();
- $this->assertNotEmpty($this->readAttribute($ri, 'resources'));
-
- $ri->setLimit(10);
- $this->assertEmpty($this->readAttribute($ri, 'resources'));
-
- $ri->toArray();
- $this->assertNotEmpty($this->readAttribute($ri, 'resources'));
- $ri->setPageSize(10);
- $this->assertEmpty($this->readAttribute($ri, 'resources'));
- }
-
- public function testWorksWithCustomAppendIterator()
- {
- $this->getServer()->flush();
- $this->getServer()->enqueue(array(
- "HTTP/1.1 200 OK\r\n\r\n{ \"next_token\": \"\", \"resources\": [\"d\", \"e\", \"f\"] }"
- ));
- $ri = new MockCommandIterator($this->getServiceBuilder()->get('mock')->getCommand('iterable_command'));
- $a = new \Guzzle\Iterator\AppendIterator();
- $a->append($ri);
- $results = iterator_to_array($a, false);
- $this->assertEquals(4, $ri->calledNext);
- }
-}
diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Stream/PhpStreamRequestFactoryTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Stream/PhpStreamRequestFactoryTest.php
deleted file mode 100644
index 083aaa0d9d7..00000000000
--- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Stream/PhpStreamRequestFactoryTest.php
+++ /dev/null
@@ -1,172 +0,0 @@
-client = new Client($this->getServer()->getUrl());
- $this->factory = new PhpStreamRequestFactory();
- }
-
- public function testOpensValidStreamByCreatingContext()
- {
- $this->getServer()->enqueue("HTTP/1.1 200 OK\r\nContent-Length: 2\r\n\r\nhi");
- $request = $this->client->get('/');
- $stream = $this->factory->fromRequest($request);
- $this->assertEquals('hi', (string) $stream);
- $headers = $this->factory->getLastResponseHeaders();
- $this->assertContains('HTTP/1.1 200 OK', $headers);
- $this->assertContains('Content-Length: 2', $headers);
- $this->assertSame($headers, $stream->getCustomData('response_headers'));
- $this->assertEquals(2, $stream->getSize());
- }
-
- public function testOpensValidStreamByPassingContextAndMerging()
- {
- $request = $this->client->get('/');
- $this->factory = $this->getMockBuilder('Guzzle\Stream\PhpStreamRequestFactory')
- ->setMethods(array('createContext', 'createStream'))
- ->getMock();
- $this->factory->expects($this->never())
- ->method('createContext');
- $this->factory->expects($this->once())
- ->method('createStream')
- ->will($this->returnValue(new Stream(fopen('php://temp', 'r'))));
-
- $context = array('http' => array('method' => 'HEAD', 'ignore_errors' => false));
- $this->factory->fromRequest($request, stream_context_create($context));
- $options = stream_context_get_options($this->readAttribute($this->factory, 'context'));
- $this->assertEquals('HEAD', $options['http']['method']);
- $this->assertFalse($options['http']['ignore_errors']);
- $this->assertEquals('1.1', $options['http']['protocol_version']);
- }
-
- public function testAppliesProxySettings()
- {
- $request = $this->client->get('/');
- $request->getCurlOptions()->set(CURLOPT_PROXY, 'tcp://foo.com');
- $this->factory = $this->getMockBuilder('Guzzle\Stream\PhpStreamRequestFactory')
- ->setMethods(array('createStream'))
- ->getMock();
- $this->factory->expects($this->once())
- ->method('createStream')
- ->will($this->returnValue(new Stream(fopen('php://temp', 'r'))));
- $this->factory->fromRequest($request);
- $options = stream_context_get_options($this->readAttribute($this->factory, 'context'));
- $this->assertEquals('tcp://foo.com', $options['http']['proxy']);
- }
-
- public function testAddsPostFields()
- {
- $this->getServer()->flush();
- $this->getServer()->enqueue("HTTP/1.1 200 OK\r\nContent-Length: 2\r\n\r\nhi");
- $request = $this->client->post('/', array('Foo' => 'Bar'), array('foo' => 'baz bar'));
- $stream = $this->factory->fromRequest($request);
- $this->assertEquals('hi', (string) $stream);
-
- $headers = $this->factory->getLastResponseHeaders();
- $this->assertContains('HTTP/1.1 200 OK', $headers);
- $this->assertContains('Content-Length: 2', $headers);
- $this->assertSame($headers, $stream->getCustomData('response_headers'));
-
- $received = $this->getServer()->getReceivedRequests();
- $this->assertEquals(1, count($received));
- $this->assertContains('POST / HTTP/1.1', $received[0]);
- $this->assertContains('host: ', $received[0]);
- $this->assertContains('user-agent: Guzzle/', $received[0]);
- $this->assertContains('foo: Bar', $received[0]);
- $this->assertContains('content-length: 13', $received[0]);
- $this->assertContains('foo=baz%20bar', $received[0]);
- }
-
- public function testAddsBody()
- {
- $this->getServer()->flush();
- $this->getServer()->enqueue("HTTP/1.1 200 OK\r\nContent-Length: 2\r\n\r\nhi");
- $request = $this->client->put('/', array('Foo' => 'Bar'), 'Testing...123');
- $stream = $this->factory->fromRequest($request);
- $this->assertEquals('hi', (string) $stream);
-
- $headers = $this->factory->getLastResponseHeaders();
- $this->assertContains('HTTP/1.1 200 OK', $headers);
- $this->assertContains('Content-Length: 2', $headers);
- $this->assertSame($headers, $stream->getCustomData('response_headers'));
-
- $received = $this->getServer()->getReceivedRequests();
- $this->assertEquals(1, count($received));
- $this->assertContains('PUT / HTTP/1.1', $received[0]);
- $this->assertContains('host: ', $received[0]);
- $this->assertContains('user-agent: Guzzle/', $received[0]);
- $this->assertContains('foo: Bar', $received[0]);
- $this->assertContains('content-length: 13', $received[0]);
- $this->assertContains('Testing...123', $received[0]);
- }
-
- public function testCanDisableSslValidation()
- {
- $request = $this->client->get('/');
- $request->getCurlOptions()->set(CURLOPT_SSL_VERIFYPEER, false);
- $this->factory = $this->getMockBuilder('Guzzle\Stream\PhpStreamRequestFactory')
- ->setMethods(array('createStream'))
- ->getMock();
- $this->factory->expects($this->once())
- ->method('createStream')
- ->will($this->returnValue(new Stream(fopen('php://temp', 'r'))));
- $this->factory->fromRequest($request);
- $options = stream_context_get_options($this->readAttribute($this->factory, 'context'));
- $this->assertFalse($options['ssl']['verify_peer']);
- }
-
- public function testUsesSslValidationByDefault()
- {
- $request = $this->client->get('/');
- $this->factory = $this->getMockBuilder('Guzzle\Stream\PhpStreamRequestFactory')
- ->setMethods(array('createStream'))
- ->getMock();
- $this->factory->expects($this->once())
- ->method('createStream')
- ->will($this->returnValue(new Stream(fopen('php://temp', 'r'))));
- $this->factory->fromRequest($request);
- $options = stream_context_get_options($this->readAttribute($this->factory, 'context'));
- $this->assertTrue($options['ssl']['verify_peer']);
- $this->assertSame($request->getCurlOptions()->get(CURLOPT_CAINFO), $options['ssl']['cafile']);
- }
-
- public function testBasicAuthAddsUserAndPassToUrl()
- {
- $request = $this->client->get('/');
- $request->setAuth('Foo', 'Bar');
- $this->factory = $this->getMockBuilder('Guzzle\Stream\PhpStreamRequestFactory')
- ->setMethods(array('createStream'))
- ->getMock();
- $this->factory->expects($this->once())
- ->method('createStream')
- ->will($this->returnValue(new Stream(fopen('php://temp', 'r'))));
- $this->factory->fromRequest($request);
- $this->assertContains('Foo:Bar@', (string) $this->readAttribute($this->factory, 'url'));
- }
-
- public function testCanCreateCustomStreamClass()
- {
- $this->getServer()->enqueue("HTTP/1.1 200 OK\r\nContent-Length: 2\r\n\r\nhi");
- $request = $this->client->get('/');
- $stream = $this->factory->fromRequest($request, array(), array('stream_class' => 'Guzzle\Http\EntityBody'));
- $this->assertInstanceOf('Guzzle\Http\EntityBody', $stream);
- }
-}
diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Stream/StreamTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Stream/StreamTest.php
deleted file mode 100644
index 4973f252e11..00000000000
--- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Stream/StreamTest.php
+++ /dev/null
@@ -1,189 +0,0 @@
-assertEquals($handle, $stream->getStream());
- $this->assertTrue($stream->isReadable());
- $this->assertTrue($stream->isWritable());
- $this->assertTrue($stream->isLocal());
- $this->assertTrue($stream->isSeekable());
- $this->assertEquals('PHP', $stream->getWrapper());
- $this->assertEquals('TEMP', $stream->getStreamType());
- $this->assertEquals(4, $stream->getSize());
- $this->assertEquals('php://temp', $stream->getUri());
- $this->assertEquals(array(), $stream->getWrapperData());
- $this->assertFalse($stream->isConsumed());
- unset($stream);
- }
-
- public function testCanModifyStream()
- {
- $handle1 = fopen('php://temp', 'r+');
- $handle2 = fopen('php://temp', 'r+');
- $stream = new Stream($handle1);
- $this->assertSame($handle1, $stream->getStream());
- $stream->setStream($handle2, 10);
- $this->assertEquals(10, $stream->getSize());
- $this->assertSame($handle2, $stream->getStream());
- }
-
- public function testStreamClosesHandleOnDestruct()
- {
- $handle = fopen('php://temp', 'r');
- $stream = new Stream($handle);
- unset($stream);
- $this->assertFalse(is_resource($handle));
- }
-
- public function testConvertsToString()
- {
- $handle = fopen('php://temp', 'w+');
- fwrite($handle, 'data');
- $stream = new Stream($handle);
- $this->assertEquals('data', (string) $stream);
- unset($stream);
-
- $handle = fopen(__DIR__ . '/../TestData/FileBody.txt', 'r');
- $stream = new Stream($handle);
- $this->assertEquals('', (string) $stream);
- unset($stream);
- }
-
- public function testConvertsToStringAndRestoresCursorPos()
- {
- $handle = fopen('php://temp', 'w+');
- $stream = new Stream($handle);
- $stream->write('foobazbar');
- $stream->seek(3);
- $this->assertEquals('foobazbar', (string) $stream);
- $this->assertEquals(3, $stream->ftell());
- }
-
- public function testIsConsumed()
- {
- $handle = fopen('php://temp', 'w+');
- fwrite($handle, 'data');
- $stream = new Stream($handle);
- $this->assertFalse($stream->isConsumed());
- $stream->read(4);
- $this->assertTrue($stream->isConsumed());
- }
-
- public function testAllowsSettingManualSize()
- {
- $handle = fopen('php://temp', 'w+');
- fwrite($handle, 'data');
- $stream = new Stream($handle);
- $stream->setSize(10);
- $this->assertEquals(10, $stream->getSize());
- unset($stream);
- }
-
- public function testWrapsStream()
- {
- $handle = fopen('php://temp', 'w+');
- fwrite($handle, 'data');
- $stream = new Stream($handle);
- $this->assertTrue($stream->isSeekable());
- $this->assertTrue($stream->isReadable());
- $this->assertTrue($stream->seek(0));
- $this->assertEquals('da', $stream->read(2));
- $this->assertEquals('ta', $stream->read(2));
- $this->assertTrue($stream->seek(0));
- $this->assertEquals('data', $stream->read(4));
- $stream->write('_appended');
- $stream->seek(0);
- $this->assertEquals('data_appended', $stream->read(13));
- }
-
- public function testGetSize()
- {
- $size = filesize(__DIR__ . '/../../../bootstrap.php');
- $handle = fopen(__DIR__ . '/../../../bootstrap.php', 'r');
- $stream = new Stream($handle);
- $this->assertEquals($handle, $stream->getStream());
- $this->assertEquals($size, $stream->getSize());
- $this->assertEquals($size, $stream->getSize());
- unset($stream);
-
- // Make sure that false is returned when the size cannot be determined
- $this->getServer()->enqueue("HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n");
- $handle = fopen('http://127.0.0.1:' . $this->getServer()->getPort(), 'r');
- $stream = new Stream($handle);
- $this->assertEquals(false, $stream->getSize());
- unset($stream);
- }
-
- public function testEnsuresSizeIsConsistent()
- {
- $h = fopen('php://temp', 'r+');
- fwrite($h, 'foo');
- $stream = new Stream($h);
- $this->assertEquals(3, $stream->getSize());
- $stream->write('test');
- $this->assertEquals(7, $stream->getSize());
- fclose($h);
- }
-
- public function testAbstractsMetaData()
- {
- $handle = fopen(__DIR__ . '/../../../bootstrap.php', 'r');
- $stream = new Stream($handle);
- $this->assertEquals('plainfile', $stream->getMetaData('wrapper_type'));
- $this->assertEquals(null, $stream->getMetaData('wrapper_data'));
- $this->assertInternalType('array', $stream->getMetaData());
- }
-
- public function testDoesNotAttemptToWriteToReadonlyStream()
- {
- $handle = fopen(__DIR__ . '/../../../bootstrap.php', 'r');
- $stream = new Stream($handle);
- $this->assertEquals(0, $stream->write('foo'));
- }
-
- public function testProvidesStreamPosition()
- {
- $handle = fopen(__DIR__ . '/../../../bootstrap.php', 'r');
- $stream = new Stream($handle);
- $stream->read(2);
- $this->assertSame(ftell($handle), $stream->ftell());
- $this->assertEquals(2, $stream->ftell());
- }
-
- public function testRewindIsSeekZero()
- {
- $stream = new Stream(fopen('php://temp', 'w+'));
- $stream->write('foobazbar');
- $this->assertTrue($stream->rewind());
- $this->assertEquals('foobazbar', $stream->read(9));
- }
-
- public function testCanDetachStream()
- {
- $r = fopen('php://temp', 'w+');
- $stream = new Stream($r);
- $stream->detachStream();
- $this->assertNull($stream->getStream());
- }
-}
diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/TestData/description/bar.json b/vendor/guzzle/guzzle/tests/Guzzle/Tests/TestData/description/bar.json
deleted file mode 100644
index c354ed78855..00000000000
--- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/TestData/description/bar.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "includes": ["foo.json"]
-}
diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/TestData/description/baz.json b/vendor/guzzle/guzzle/tests/Guzzle/Tests/TestData/description/baz.json
deleted file mode 100644
index 765237b3ee2..00000000000
--- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/TestData/description/baz.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "includes": ["foo.json", "bar.json"]
-}
diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/TestData/description/foo.json b/vendor/guzzle/guzzle/tests/Guzzle/Tests/TestData/description/foo.json
deleted file mode 100644
index cee5005b8c5..00000000000
--- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/TestData/description/foo.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "includes": ["recursive.json"],
- "operations": {
- "abstract": {
- "httpMethod": "POST"
- }
- }
-}
diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/TestData/description/recursive.json b/vendor/guzzle/guzzle/tests/Guzzle/Tests/TestData/description/recursive.json
deleted file mode 100644
index c354ed78855..00000000000
--- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/TestData/description/recursive.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "includes": ["foo.json"]
-}
diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/TestData/mock_response b/vendor/guzzle/guzzle/tests/Guzzle/Tests/TestData/mock_response
deleted file mode 100644
index b6938a28cec..00000000000
--- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/TestData/mock_response
+++ /dev/null
@@ -1,3 +0,0 @@
-HTTP/1.1 200 OK
-Content-Length: 0
-
diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/TestData/services/json1.json b/vendor/guzzle/guzzle/tests/Guzzle/Tests/TestData/services/json1.json
deleted file mode 100644
index 7b2a9dad4d1..00000000000
--- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/TestData/services/json1.json
+++ /dev/null
@@ -1,18 +0,0 @@
-{
- "includes": [ "json2.json" ],
- "services": {
- "abstract": {
- "access_key": "xyz",
- "secret": "abc"
- },
- "mock": {
- "class": "Guzzle\\Tests\\Service\\Mock\\MockClient",
- "extends": "abstract",
- "params": {
- "username": "foo",
- "password": "baz",
- "subdomain": "bar"
- }
- }
- }
-}
diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/TestData/services/json2.json b/vendor/guzzle/guzzle/tests/Guzzle/Tests/TestData/services/json2.json
deleted file mode 100644
index 08e5566f042..00000000000
--- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/TestData/services/json2.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "services": {
- "foo": {
- "class": "Guzzle\\Tests\\Service\\Mock\\MockClient",
- "extends": "abstract",
- "params": {
- "baz": "bar"
- }
- }
- }
-}
diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/TestData/services/services.json b/vendor/guzzle/guzzle/tests/Guzzle/Tests/TestData/services/services.json
deleted file mode 100644
index 25452e4a4d0..00000000000
--- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/TestData/services/services.json
+++ /dev/null
@@ -1,71 +0,0 @@
-{
- "abstract": {
- "access_key": "xyz",
- "secret": "abc"
- },
- "mock": {
- "class": "Guzzle\\Tests\\Service\\Mock\\MockClient",
- "extends": "abstract",
- "params": {
- "username": "foo",
- "password": "baz",
- "subdomain": "bar"
- }
- },
-
- "test.abstract.aws": {
- "params": {
- "access_key": "12345",
- "secret_key": "abcd"
- }
- },
-
- "test.s3": {
- "class": "Guzzle\\Service\\Aws\\S3Client",
- "extends": "test.abstract.aws",
- "params": {
- "devpay_product_token": "",
- "devpay_user_token": ""
- }
- },
-
- "test.simple_db": {
- "class": "Guzzle\\Service\\Aws\\SimpleDb\\SimpleDbClient",
- "extends": "test.abstract.aws"
- },
-
- "test.sqs": {
- "class": "Guzzle\\Service\\Aws\\Sqs\\SqsClient",
- "extends": "test.abstract.aws"
- },
-
- "test.centinel": {
- "class": "Guzzle\\Service\\CardinalCommerce\\Centinel.CentinelClient",
- "params": {
- "password": "test",
- "processor_id": "123",
- "merchant_id": "456"
- }
- },
-
- "test.mws": {
- "class": "Guzzle\\Service\\Mws\\MwsClient",
- "extends": "test.abstract.aws",
- "params": {
- "merchant_id": "ABCDE",
- "marketplace_id": "FGHIJ",
- "application_name": "GuzzleTest",
- "application_version": "0.1",
- "base_url": "https://mws.amazonservices.com"
- }
- },
-
- "mock": {
- "class": "Guzzle\\Tests\\Service\\Mock\\MockClient",
- "params": {
- "username": "test_user",
- "password": "****",
- "subdomain": "test"
- }
- }
-}
diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/TestData/test_service.json b/vendor/guzzle/guzzle/tests/Guzzle/Tests/TestData/test_service.json
deleted file mode 100644
index 01557ca11da..00000000000
--- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/TestData/test_service.json
+++ /dev/null
@@ -1,40 +0,0 @@
-{
- "includes": [ "test_service2.json" ],
- "operations": {
- "test": {
- "uri": "/path"
- },
- "concrete": {
- "extends": "abstract"
- },
- "foo_bar": {
- "uri": "/testing",
- "parameters": {
- "other": {
- "location": "json",
- "location_key": "Other"
- },
- "test": {
- "type": "object",
- "location": "json",
- "properties": {
- "baz": {
- "type": "boolean",
- "default": true
- },
- "bar": {
- "type": "string",
- "filters": [
- {
- "method": "strtolower",
- "args": ["test", "@value"]
- },
- "strtoupper"
- ]
- }
- }
- }
- }
- }
- }
-}
diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/TestData/test_service2.json b/vendor/guzzle/guzzle/tests/Guzzle/Tests/TestData/test_service2.json
deleted file mode 100644
index 66dd9ef7e9d..00000000000
--- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/TestData/test_service2.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "operations": {
- "abstract": {
- "uri": "/abstract"
- }
- }
-}
diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/TestData/test_service_3.json b/vendor/guzzle/guzzle/tests/Guzzle/Tests/TestData/test_service_3.json
deleted file mode 100644
index ae2ae0bd49f..00000000000
--- a/vendor/guzzle/guzzle/tests/Guzzle/Tests/TestData/test_service_3.json
+++ /dev/null
@@ -1,40 +0,0 @@
-{
- "includes": [ "test_service2.json" ],
- "operations": {
- "test": {
- "uri": "/path"
- },
- "concrete": {
- "extends": "abstract"
- },
- "baz_qux": {
- "uri": "/testing",
- "parameters": {
- "other": {
- "location": "json",
- "location_key": "Other"
- },
- "test": {
- "type": "object",
- "location": "json",
- "properties": {
- "baz": {
- "type": "boolean",
- "default": true
- },
- "bar": {
- "type": "string",
- "filters": [
- {
- "method": "strtolower",
- "args": ["test", "@value"]
- },
- "strtoupper"
- ]
- }
- }
- }
- }
- }
- }
-}
diff --git a/vendor/guzzle/guzzle/tests/bootstrap.php b/vendor/guzzle/guzzle/tests/bootstrap.php
deleted file mode 100644
index 28908d31045..00000000000
--- a/vendor/guzzle/guzzle/tests/bootstrap.php
+++ /dev/null
@@ -1,10 +0,0 @@
-ignoringCase());
-
-* Fixed Hamcrest_Core_IsInstanceOf to return false for native types.
-
-* Moved string-based matchers to Hamcrest_Text package.
- StringContains, StringEndsWith, StringStartsWith, and SubstringMatcher
-
-* Hamcrest.php and Hamcrest_Matchers.php are now built from @factory doctags.
- Added @factory doctag to every static factory method.
-
-* Hamcrest_Matchers and Hamcrest.php now import each matcher as-needed
- and Hamcrest.php calls the matchers directly instead of Hamcrest_Matchers.
-
-
-== Version 0.3.0: Released Jul 26 2010 ==
-
-* Added running count to Hamcrest_MatcherAssert with methods to get and reset it.
- This can be used by unit testing frameworks for reporting.
-
-* Added Hamcrest_Core_HasToString to assert return value of toString() or __toString().
-
- assertThat($anObject, hasToString('foo'));
-
-* Added Hamcrest_Type_IsScalar to assert is_scalar().
- Matches values of type bool, int, float, double, and string.
-
- assertThat($count, scalarValue());
- assertThat('foo', scalarValue());
-
-* Added Hamcrest_Collection package.
-
- - IsEmptyTraversable
- - IsTraversableWithSize
-
- assertThat($iterator, emptyTraversable());
- assertThat($iterator, traversableWithSize(5));
-
-* Added Hamcrest_Xml_HasXPath to assert XPath expressions or the content of nodes in an XML/HTML DOM.
-
- assertThat($dom, hasXPath('books/book/title'));
- assertThat($dom, hasXPath('books/book[contains(title, "Alice")]', 3));
- assertThat($dom, hasXPath('books/book/title', 'Alice in Wonderland'));
- assertThat($dom, hasXPath('count(books/book)', greaterThan(10)));
-
-* Added aliases to match the Java API.
-
- hasEntry() -> hasKeyValuePair()
- hasValue() -> hasItemInArray()
- contains() -> arrayContaining()
- containsInAnyOrder() -> arrayContainingInAnyOrder()
-
-* Added optional subtype to Hamcrest_TypeSafeMatcher to enforce object class or resource type.
-
-* Hamcrest_TypeSafeDiagnosingMatcher now extends Hamcrest_TypeSafeMatcher.
-
-
-== Version 0.2.0: Released Jul 14 2010 ==
-
-Issues Fixed: 109, 111, 114, 115
-
-* Description::appendValues() and appendValueList() accept Iterator and IteratorAggregate. [111]
- BaseDescription::appendValue() handles IteratorAggregate.
-
-* assertThat() accepts a single boolean parameter and
- wraps any non-Matcher third parameter with equalTo().
-
-* Removed null return value from assertThat(). [114]
-
-* Fixed wrong variable name in contains(). [109]
-
-* Added Hamcrest_Core_IsSet to assert isset().
-
- assertThat(array('foo' => 'bar'), set('foo'));
- assertThat(array('foo' => 'bar'), notSet('bar'));
-
-* Added Hamcrest_Core_IsTypeOf to assert built-in types with gettype(). [115]
- Types: array, boolean, double, integer, null, object, resource, and string.
- Note that gettype() returns "double" for float values.
-
- assertThat($count, typeOf('integer'));
- assertThat(3.14159, typeOf('double'));
- assertThat(array('foo', 'bar'), typeOf('array'));
- assertThat(new stdClass(), typeOf('object'));
-
-* Added type-specific matchers in new Hamcrest_Type package.
-
- - IsArray
- - IsBoolean
- - IsDouble (includes float values)
- - IsInteger
- - IsObject
- - IsResource
- - IsString
-
- assertThat($count, integerValue());
- assertThat(3.14159, floatValue());
- assertThat('foo', stringValue());
-
-* Added Hamcrest_Type_IsNumeric to assert is_numeric().
- Matches values of type int and float/double or strings that are formatted as numbers.
-
- assertThat(5, numericValue());
- assertThat('-5e+3', numericValue());
-
-* Added Hamcrest_Type_IsCallable to assert is_callable().
-
- assertThat('preg_match', callable());
- assertThat(array('SomeClass', 'SomeMethod'), callable());
- assertThat(array($object, 'SomeMethod'), callable());
- assertThat($object, callable());
- assertThat(function ($x, $y) { return $x + $y; }, callable());
-
-* Added Hamcrest_Text_MatchesPattern for regex matching with preg_match().
-
- assertThat('foobar', matchesPattern('/o+b/'));
-
-* Added aliases:
- - atLeast() for greaterThanOrEqualTo()
- - atMost() for lessThanOrEqualTo()
-
-
-== Version 0.1.0: Released Jul 7 2010 ==
-
-* Created PEAR package
-
-* Core matchers
-
diff --git a/vendor/hamcrest/hamcrest-php/LICENSE.txt b/vendor/hamcrest/hamcrest-php/LICENSE.txt
deleted file mode 100644
index 91cd329a45f..00000000000
--- a/vendor/hamcrest/hamcrest-php/LICENSE.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-BSD License
-
-Copyright (c) 2000-2014, www.hamcrest.org
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-Redistributions of source code must retain the above copyright notice, this list of
-conditions and the following disclaimer. Redistributions in binary form must reproduce
-the above copyright notice, this list of conditions and the following disclaimer in
-the documentation and/or other materials provided with the distribution.
-
-Neither the name of Hamcrest nor the names of its contributors may be used to endorse
-or promote products derived from this software without specific prior written
-permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
-EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
-SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
-TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
-WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGE.
diff --git a/vendor/hamcrest/hamcrest-php/README.md b/vendor/hamcrest/hamcrest-php/README.md
deleted file mode 100644
index 47c24f1fc9f..00000000000
--- a/vendor/hamcrest/hamcrest-php/README.md
+++ /dev/null
@@ -1,51 +0,0 @@
-This is the PHP port of Hamcrest Matchers
-=========================================
-
-[![Scrutinizer Quality Score](https://scrutinizer-ci.com/g/hamcrest/hamcrest-php/badges/quality-score.png?s=754f5c0556419fc6204917ca9a9dcf2fa2b45ed0)](https://scrutinizer-ci.com/g/hamcrest/hamcrest-php/)
-[![Build Status](https://travis-ci.org/hamcrest/hamcrest-php.png?branch=master)](https://travis-ci.org/hamcrest/hamcrest-php)
-[![Coverage Status](https://coveralls.io/repos/hamcrest/hamcrest-php/badge.png)](https://coveralls.io/r/hamcrest/hamcrest-php)
-
-Hamcrest is a matching library originally written for Java, but
-subsequently ported to many other languages. hamcrest-php is the
-official PHP port of Hamcrest and essentially follows a literal
-translation of the original Java API for Hamcrest, with a few
-Exceptions, mostly down to PHP language barriers:
-
- 1. `instanceOf($theClass)` is actually `anInstanceOf($theClass)`
-
- 2. `both(containsString('a'))->and(containsString('b'))`
- is actually `both(containsString('a'))->andAlso(containsString('b'))`
-
- 3. `either(containsString('a'))->or(containsString('b'))`
- is actually `either(containsString('a'))->orElse(containsString('b'))`
-
- 4. Unless it would be non-semantic for a matcher to do so, hamcrest-php
- allows dynamic typing for it's input, in "the PHP way". Exception are
- where semantics surrounding the type itself would suggest otherwise,
- such as stringContains() and greaterThan().
-
- 5. Several official matchers have not been ported because they don't
- make sense or don't apply in PHP:
-
- - `typeCompatibleWith($theClass)`
- - `eventFrom($source)`
- - `hasProperty($name)` **
- - `samePropertyValuesAs($obj)` **
-
- 6. When most of the collections matchers are finally ported, PHP-specific
- aliases will probably be created due to a difference in naming
- conventions between Java's Arrays, Collections, Sets and Maps compared
- with PHP's Arrays.
-
-Usage
------
-
-Hamcrest matchers are easy to use as:
-
-```php
-Hamcrest_MatcherAssert::assertThat('a', Hamcrest_Matchers::equalToIgnoringCase('A'));
-```
-
- ** [Unless we consider POPO's (Plain Old PHP Objects) akin to JavaBeans]
- - The POPO thing is a joke. Java devs coin the term POJO's (Plain Old
- Java Objects).
diff --git a/vendor/hamcrest/hamcrest-php/TODO.txt b/vendor/hamcrest/hamcrest-php/TODO.txt
deleted file mode 100644
index 92e1190d8a9..00000000000
--- a/vendor/hamcrest/hamcrest-php/TODO.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-Still TODO Before Complete for PHP
-----------------------------------
-
-Port:
-
- - Hamcrest_Collection_*
- - IsCollectionWithSize
- - IsEmptyCollection
- - IsIn
- - IsTraversableContainingInAnyOrder
- - IsTraversableContainingInOrder
- - IsMapContaining (aliases)
-
-Aliasing/Deprecation (questionable):
-
- - Find and fix any factory methods that start with "is".
-
-Namespaces:
-
- - Investigate adding PHP 5.3+ namespace support in a way that still permits
- use in PHP 5.2.
- - Other than a parallel codebase, I don't see how this could be possible.
diff --git a/vendor/hamcrest/hamcrest-php/composer.json b/vendor/hamcrest/hamcrest-php/composer.json
deleted file mode 100644
index a1b48c1f6dc..00000000000
--- a/vendor/hamcrest/hamcrest-php/composer.json
+++ /dev/null
@@ -1,32 +0,0 @@
-{
- "name": "hamcrest/hamcrest-php",
- "type": "library",
- "description": "This is the PHP port of Hamcrest Matchers",
- "keywords": ["test"],
- "license": "BSD",
- "authors": [
- ],
-
- "autoload": {
- "classmap": ["hamcrest"],
- "files": ["hamcrest/Hamcrest.php"]
- },
- "autoload-dev": {
- "classmap": ["tests", "generator"]
- },
-
- "require": {
- "php": ">=5.3.2"
- },
-
- "require-dev": {
- "satooshi/php-coveralls": "dev-master",
- "phpunit/php-file-iterator": "1.3.3"
- },
-
- "replace": {
- "kodova/hamcrest-php": "*",
- "davedevelopment/hamcrest-php": "*",
- "cordoval/hamcrest-php": "*"
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/generator/FactoryCall.php b/vendor/hamcrest/hamcrest-php/generator/FactoryCall.php
deleted file mode 100644
index 83965b2ae42..00000000000
--- a/vendor/hamcrest/hamcrest-php/generator/FactoryCall.php
+++ /dev/null
@@ -1,41 +0,0 @@
-method = $method;
- $this->name = $name;
- }
-
- public function getMethod()
- {
- return $this->method;
- }
-
- public function getName()
- {
- return $this->name;
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/generator/FactoryClass.php b/vendor/hamcrest/hamcrest-php/generator/FactoryClass.php
deleted file mode 100644
index 0c6bf78d742..00000000000
--- a/vendor/hamcrest/hamcrest-php/generator/FactoryClass.php
+++ /dev/null
@@ -1,72 +0,0 @@
-file = $file;
- $this->reflector = $class;
- $this->extractFactoryMethods();
- }
-
- public function extractFactoryMethods()
- {
- $this->methods = array();
- foreach ($this->getPublicStaticMethods() as $method) {
- if ($method->isFactory()) {
-// echo $this->getName() . '::' . $method->getName() . ' : ' . count($method->getCalls()) . PHP_EOL;
- $this->methods[] = $method;
- }
- }
- }
-
- public function getPublicStaticMethods()
- {
- $methods = array();
- foreach ($this->reflector->getMethods(ReflectionMethod::IS_STATIC) as $method) {
- if ($method->isPublic() && $method->getDeclaringClass() == $this->reflector) {
- $methods[] = new FactoryMethod($this, $method);
- }
- }
- return $methods;
- }
-
- public function getFile()
- {
- return $this->file;
- }
-
- public function getName()
- {
- return $this->reflector->name;
- }
-
- public function isFactory()
- {
- return !empty($this->methods);
- }
-
- public function getMethods()
- {
- return $this->methods;
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/generator/FactoryFile.php b/vendor/hamcrest/hamcrest-php/generator/FactoryFile.php
deleted file mode 100644
index ac3d6c7d3b5..00000000000
--- a/vendor/hamcrest/hamcrest-php/generator/FactoryFile.php
+++ /dev/null
@@ -1,122 +0,0 @@
-file = $file;
- $this->indent = $indent;
- }
-
- abstract public function addCall(FactoryCall $call);
-
- abstract public function build();
-
- public function addFileHeader()
- {
- $this->code = '';
- $this->addPart('file_header');
- }
-
- public function addPart($name)
- {
- $this->addCode($this->readPart($name));
- }
-
- public function addCode($code)
- {
- $this->code .= $code;
- }
-
- public function readPart($name)
- {
- return file_get_contents(__DIR__ . "/parts/$name.txt");
- }
-
- public function generateFactoryCall(FactoryCall $call)
- {
- $method = $call->getMethod();
- $code = $method->getComment($this->indent) . PHP_EOL;
- $code .= $this->generateDeclaration($call->getName(), $method);
- // $code .= $this->generateImport($method);
- $code .= $this->generateCall($method);
- $code .= $this->generateClosing();
- return $code;
- }
-
- public function generateDeclaration($name, FactoryMethod $method)
- {
- $code = $this->indent . $this->getDeclarationModifiers()
- . 'function ' . $name . '('
- . $this->generateDeclarationArguments($method)
- . ')' . PHP_EOL . $this->indent . '{' . PHP_EOL;
- return $code;
- }
-
- public function getDeclarationModifiers()
- {
- return '';
- }
-
- public function generateDeclarationArguments(FactoryMethod $method)
- {
- if ($method->acceptsVariableArguments()) {
- return '/* args... */';
- } else {
- return $method->getParameterDeclarations();
- }
- }
-
- public function generateImport(FactoryMethod $method)
- {
- return $this->indent . self::INDENT . "require_once '" . $method->getClass()->getFile() . "';" . PHP_EOL;
- }
-
- public function generateCall(FactoryMethod $method)
- {
- $code = '';
- if ($method->acceptsVariableArguments()) {
- $code .= $this->indent . self::INDENT . '$args = func_get_args();' . PHP_EOL;
- }
-
- $code .= $this->indent . self::INDENT . 'return ';
- if ($method->acceptsVariableArguments()) {
- $code .= 'call_user_func_array(array(\''
- . '\\' . $method->getClassName() . '\', \''
- . $method->getName() . '\'), $args);' . PHP_EOL;
- } else {
- $code .= '\\' . $method->getClassName() . '::'
- . $method->getName() . '('
- . $method->getParameterInvocations() . ');' . PHP_EOL;
- }
-
- return $code;
- }
-
- public function generateClosing()
- {
- return $this->indent . '}' . PHP_EOL;
- }
-
- public function write()
- {
- file_put_contents($this->file, $this->code);
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/generator/FactoryGenerator.php b/vendor/hamcrest/hamcrest-php/generator/FactoryGenerator.php
deleted file mode 100644
index 37f80b6e93b..00000000000
--- a/vendor/hamcrest/hamcrest-php/generator/FactoryGenerator.php
+++ /dev/null
@@ -1,115 +0,0 @@
-path = $path;
- $this->factoryFiles = array();
- }
-
- public function addFactoryFile(FactoryFile $factoryFile)
- {
- $this->factoryFiles[] = $factoryFile;
- }
-
- public function generate()
- {
- $classes = $this->getClassesWithFactoryMethods();
- foreach ($classes as $class) {
- foreach ($class->getMethods() as $method) {
- foreach ($method->getCalls() as $call) {
- foreach ($this->factoryFiles as $file) {
- $file->addCall($call);
- }
- }
- }
- }
- }
-
- public function write()
- {
- foreach ($this->factoryFiles as $file) {
- $file->build();
- $file->write();
- }
- }
-
- public function getClassesWithFactoryMethods()
- {
- $classes = array();
- $files = $this->getSortedFiles();
- foreach ($files as $file) {
- $class = $this->getFactoryClass($file);
- if ($class !== null) {
- $classes[] = $class;
- }
- }
-
- return $classes;
- }
-
- public function getSortedFiles()
- {
- $iter = \File_Iterator_Factory::getFileIterator($this->path, '.php');
- $files = array();
- foreach ($iter as $file) {
- $files[] = $file;
- }
- sort($files, SORT_STRING);
-
- return $files;
- }
-
- public function getFactoryClass($file)
- {
- $name = $this->getFactoryClassName($file);
- if ($name !== null) {
- require_once $file;
-
- if (class_exists($name)) {
- $class = new FactoryClass(substr($file, strpos($file, 'Hamcrest/')), new ReflectionClass($name));
- if ($class->isFactory()) {
- return $class;
- }
- }
- }
-
- return null;
- }
-
- public function getFactoryClassName($file)
- {
- $content = file_get_contents($file);
- if (preg_match('/namespace\s+(.+);/', $content, $namespace)
- && preg_match('/\n\s*class\s+(\w+)\s+extends\b/', $content, $className)
- && preg_match('/@factory\b/', $content)
- ) {
- return $namespace[1] . '\\' . $className[1];
- }
-
- return null;
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/generator/FactoryMethod.php b/vendor/hamcrest/hamcrest-php/generator/FactoryMethod.php
deleted file mode 100644
index 44f8dc510c6..00000000000
--- a/vendor/hamcrest/hamcrest-php/generator/FactoryMethod.php
+++ /dev/null
@@ -1,231 +0,0 @@
-class = $class;
- $this->reflector = $reflector;
- $this->extractCommentWithoutLeadingShashesAndStars();
- $this->extractFactoryNamesFromComment();
- $this->extractParameters();
- }
-
- public function extractCommentWithoutLeadingShashesAndStars()
- {
- $this->comment = explode("\n", $this->reflector->getDocComment());
- foreach ($this->comment as &$line) {
- $line = preg_replace('#^\s*(/\\*+|\\*+/|\\*)\s?#', '', $line);
- }
- $this->trimLeadingBlankLinesFromComment();
- $this->trimTrailingBlankLinesFromComment();
- }
-
- public function trimLeadingBlankLinesFromComment()
- {
- while (count($this->comment) > 0) {
- $line = array_shift($this->comment);
- if (trim($line) != '') {
- array_unshift($this->comment, $line);
- break;
- }
- }
- }
-
- public function trimTrailingBlankLinesFromComment()
- {
- while (count($this->comment) > 0) {
- $line = array_pop($this->comment);
- if (trim($line) != '') {
- array_push($this->comment, $line);
- break;
- }
- }
- }
-
- public function extractFactoryNamesFromComment()
- {
- $this->calls = array();
- for ($i = 0; $i < count($this->comment); $i++) {
- if ($this->extractFactoryNamesFromLine($this->comment[$i])) {
- unset($this->comment[$i]);
- }
- }
- $this->trimTrailingBlankLinesFromComment();
- }
-
- public function extractFactoryNamesFromLine($line)
- {
- if (preg_match('/^\s*@factory(\s+(.+))?$/', $line, $match)) {
- $this->createCalls(
- $this->extractFactoryNamesFromAnnotation(
- isset($match[2]) ? trim($match[2]) : null
- )
- );
- return true;
- }
- return false;
- }
-
- public function extractFactoryNamesFromAnnotation($value)
- {
- $primaryName = $this->reflector->getName();
- if (empty($value)) {
- return array($primaryName);
- }
- preg_match_all('/(\.{3}|-|[a-zA-Z_][a-zA-Z_0-9]*)/', $value, $match);
- $names = $match[0];
- if (in_array('...', $names)) {
- $this->isVarArgs = true;
- }
- if (!in_array('-', $names) && !in_array($primaryName, $names)) {
- array_unshift($names, $primaryName);
- }
- return $names;
- }
-
- public function createCalls(array $names)
- {
- $names = array_unique($names);
- foreach ($names as $name) {
- if ($name != '-' && $name != '...') {
- $this->calls[] = new FactoryCall($this, $name);
- }
- }
- }
-
- public function extractParameters()
- {
- $this->parameters = array();
- if (!$this->isVarArgs) {
- foreach ($this->reflector->getParameters() as $parameter) {
- $this->parameters[] = new FactoryParameter($this, $parameter);
- }
- }
- }
-
- public function getParameterDeclarations()
- {
- if ($this->isVarArgs || !$this->hasParameters()) {
- return '';
- }
- $params = array();
- foreach ($this->parameters as /** @var $parameter FactoryParameter */
- $parameter) {
- $params[] = $parameter->getDeclaration();
- }
- return implode(', ', $params);
- }
-
- public function getParameterInvocations()
- {
- if ($this->isVarArgs) {
- return '';
- }
- $params = array();
- foreach ($this->parameters as $parameter) {
- $params[] = $parameter->getInvocation();
- }
- return implode(', ', $params);
- }
-
-
- public function getClass()
- {
- return $this->class;
- }
-
- public function getClassName()
- {
- return $this->class->getName();
- }
-
- public function getName()
- {
- return $this->reflector->name;
- }
-
- public function isFactory()
- {
- return count($this->calls) > 0;
- }
-
- public function getCalls()
- {
- return $this->calls;
- }
-
- public function acceptsVariableArguments()
- {
- return $this->isVarArgs;
- }
-
- public function hasParameters()
- {
- return !empty($this->parameters);
- }
-
- public function getParameters()
- {
- return $this->parameters;
- }
-
- public function getFullName()
- {
- return $this->getClassName() . '::' . $this->getName();
- }
-
- public function getCommentText()
- {
- return implode(PHP_EOL, $this->comment);
- }
-
- public function getComment($indent = '')
- {
- $comment = $indent . '/**';
- foreach ($this->comment as $line) {
- $comment .= PHP_EOL . rtrim($indent . ' * ' . $line);
- }
- $comment .= PHP_EOL . $indent . ' */';
- return $comment;
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/generator/FactoryParameter.php b/vendor/hamcrest/hamcrest-php/generator/FactoryParameter.php
deleted file mode 100644
index 93a76b38d6c..00000000000
--- a/vendor/hamcrest/hamcrest-php/generator/FactoryParameter.php
+++ /dev/null
@@ -1,69 +0,0 @@
-method = $method;
- $this->reflector = $reflector;
- }
-
- public function getDeclaration()
- {
- if ($this->reflector->isArray()) {
- $code = 'array ';
- } else {
- $class = $this->reflector->getClass();
- if ($class !== null) {
- $code = '\\' . $class->name . ' ';
- } else {
- $code = '';
- }
- }
- $code .= '$' . $this->reflector->name;
- if ($this->reflector->isOptional()) {
- $default = $this->reflector->getDefaultValue();
- if (is_null($default)) {
- $default = 'null';
- } elseif (is_bool($default)) {
- $default = $default ? 'true' : 'false';
- } elseif (is_string($default)) {
- $default = "'" . $default . "'";
- } elseif (is_numeric($default)) {
- $default = strval($default);
- } elseif (is_array($default)) {
- $default = 'array()';
- } else {
- echo 'Warning: unknown default type for ' . $this->getMethod()->getFullName() . PHP_EOL;
- var_dump($default);
- $default = 'null';
- }
- $code .= ' = ' . $default;
- }
- return $code;
- }
-
- public function getInvocation()
- {
- return '$' . $this->reflector->name;
- }
-
- public function getMethod()
- {
- return $this->method;
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/generator/GlobalFunctionFile.php b/vendor/hamcrest/hamcrest-php/generator/GlobalFunctionFile.php
deleted file mode 100644
index 5ee1b69f018..00000000000
--- a/vendor/hamcrest/hamcrest-php/generator/GlobalFunctionFile.php
+++ /dev/null
@@ -1,42 +0,0 @@
-functions = '';
- }
-
- public function addCall(FactoryCall $call)
- {
- $this->functions .= PHP_EOL . $this->generateFactoryCall($call);
- }
-
- public function build()
- {
- $this->addFileHeader();
- $this->addPart('functions_imports');
- $this->addPart('functions_header');
- $this->addCode($this->functions);
- $this->addPart('functions_footer');
- }
-
- public function generateFactoryCall(FactoryCall $call)
- {
- $code = "if (!function_exists('{$call->getName()}')) {";
- $code.= parent::generateFactoryCall($call);
- $code.= "}\n";
-
- return $code;
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/generator/StaticMethodFile.php b/vendor/hamcrest/hamcrest-php/generator/StaticMethodFile.php
deleted file mode 100644
index 44cec02f02a..00000000000
--- a/vendor/hamcrest/hamcrest-php/generator/StaticMethodFile.php
+++ /dev/null
@@ -1,38 +0,0 @@
-methods = '';
- }
-
- public function addCall(FactoryCall $call)
- {
- $this->methods .= PHP_EOL . $this->generateFactoryCall($call);
- }
-
- public function getDeclarationModifiers()
- {
- return 'public static ';
- }
-
- public function build()
- {
- $this->addFileHeader();
- $this->addPart('matchers_imports');
- $this->addPart('matchers_header');
- $this->addCode($this->methods);
- $this->addPart('matchers_footer');
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/generator/parts/file_header.txt b/vendor/hamcrest/hamcrest-php/generator/parts/file_header.txt
deleted file mode 100644
index 7b352e4473b..00000000000
--- a/vendor/hamcrest/hamcrest-php/generator/parts/file_header.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-
- * //With an identifier
- * assertThat("assertion identifier", $apple->flavour(), equalTo("tasty"));
- * //Without an identifier
- * assertThat($apple->flavour(), equalTo("tasty"));
- * //Evaluating a boolean expression
- * assertThat("some error", $a > $b);
- *
- */
- function assertThat()
- {
- $args = func_get_args();
- call_user_func_array(
- array('Hamcrest\MatcherAssert', 'assertThat'),
- $args
- );
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/generator/parts/functions_imports.txt b/vendor/hamcrest/hamcrest-php/generator/parts/functions_imports.txt
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/vendor/hamcrest/hamcrest-php/generator/parts/matchers_footer.txt b/vendor/hamcrest/hamcrest-php/generator/parts/matchers_footer.txt
deleted file mode 100644
index 5c34318c214..00000000000
--- a/vendor/hamcrest/hamcrest-php/generator/parts/matchers_footer.txt
+++ /dev/null
@@ -1 +0,0 @@
-}
diff --git a/vendor/hamcrest/hamcrest-php/generator/parts/matchers_header.txt b/vendor/hamcrest/hamcrest-php/generator/parts/matchers_header.txt
deleted file mode 100644
index 4f8bb2b7b27..00000000000
--- a/vendor/hamcrest/hamcrest-php/generator/parts/matchers_header.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-/**
- * A series of static factories for all hamcrest matchers.
- */
-class Matchers
-{
diff --git a/vendor/hamcrest/hamcrest-php/generator/parts/matchers_imports.txt b/vendor/hamcrest/hamcrest-php/generator/parts/matchers_imports.txt
deleted file mode 100644
index 7dd68495323..00000000000
--- a/vendor/hamcrest/hamcrest-php/generator/parts/matchers_imports.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-
-namespace Hamcrest;
\ No newline at end of file
diff --git a/vendor/hamcrest/hamcrest-php/generator/run.php b/vendor/hamcrest/hamcrest-php/generator/run.php
deleted file mode 100644
index 924d752ff7a..00000000000
--- a/vendor/hamcrest/hamcrest-php/generator/run.php
+++ /dev/null
@@ -1,37 +0,0 @@
-addFactoryFile(new StaticMethodFile(STATIC_MATCHERS_FILE));
-$generator->addFactoryFile(new GlobalFunctionFile(GLOBAL_FUNCTIONS_FILE));
-$generator->generate();
-$generator->write();
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest.php
deleted file mode 100644
index 8a719eb3a29..00000000000
--- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest.php
+++ /dev/null
@@ -1,805 +0,0 @@
-
- * //With an identifier
- * assertThat("assertion identifier", $apple->flavour(), equalTo("tasty"));
- * //Without an identifier
- * assertThat($apple->flavour(), equalTo("tasty"));
- * //Evaluating a boolean expression
- * assertThat("some error", $a > $b);
- *
- */
- function assertThat()
- {
- $args = func_get_args();
- call_user_func_array(
- array('Hamcrest\MatcherAssert', 'assertThat'),
- $args
- );
- }
-}
-
-if (!function_exists('anArray')) { /**
- * Evaluates to true only if each $matcher[$i] is satisfied by $array[$i].
- */
- function anArray(/* args... */)
- {
- $args = func_get_args();
- return call_user_func_array(array('\Hamcrest\Arrays\IsArray', 'anArray'), $args);
- }
-}
-
-if (!function_exists('hasItemInArray')) { /**
- * Evaluates to true if any item in an array satisfies the given matcher.
- *
- * @param mixed $item as a {@link Hamcrest\Matcher} or a value.
- *
- * @return \Hamcrest\Arrays\IsArrayContaining
- */
- function hasItemInArray($item)
- {
- return \Hamcrest\Arrays\IsArrayContaining::hasItemInArray($item);
- }
-}
-
-if (!function_exists('hasValue')) { /**
- * Evaluates to true if any item in an array satisfies the given matcher.
- *
- * @param mixed $item as a {@link Hamcrest\Matcher} or a value.
- *
- * @return \Hamcrest\Arrays\IsArrayContaining
- */
- function hasValue($item)
- {
- return \Hamcrest\Arrays\IsArrayContaining::hasItemInArray($item);
- }
-}
-
-if (!function_exists('arrayContainingInAnyOrder')) { /**
- * An array with elements that match the given matchers.
- */
- function arrayContainingInAnyOrder(/* args... */)
- {
- $args = func_get_args();
- return call_user_func_array(array('\Hamcrest\Arrays\IsArrayContainingInAnyOrder', 'arrayContainingInAnyOrder'), $args);
- }
-}
-
-if (!function_exists('containsInAnyOrder')) { /**
- * An array with elements that match the given matchers.
- */
- function containsInAnyOrder(/* args... */)
- {
- $args = func_get_args();
- return call_user_func_array(array('\Hamcrest\Arrays\IsArrayContainingInAnyOrder', 'arrayContainingInAnyOrder'), $args);
- }
-}
-
-if (!function_exists('arrayContaining')) { /**
- * An array with elements that match the given matchers in the same order.
- */
- function arrayContaining(/* args... */)
- {
- $args = func_get_args();
- return call_user_func_array(array('\Hamcrest\Arrays\IsArrayContainingInOrder', 'arrayContaining'), $args);
- }
-}
-
-if (!function_exists('contains')) { /**
- * An array with elements that match the given matchers in the same order.
- */
- function contains(/* args... */)
- {
- $args = func_get_args();
- return call_user_func_array(array('\Hamcrest\Arrays\IsArrayContainingInOrder', 'arrayContaining'), $args);
- }
-}
-
-if (!function_exists('hasKeyInArray')) { /**
- * Evaluates to true if any key in an array matches the given matcher.
- *
- * @param mixed $key as a {@link Hamcrest\Matcher} or a value.
- *
- * @return \Hamcrest\Arrays\IsArrayContainingKey
- */
- function hasKeyInArray($key)
- {
- return \Hamcrest\Arrays\IsArrayContainingKey::hasKeyInArray($key);
- }
-}
-
-if (!function_exists('hasKey')) { /**
- * Evaluates to true if any key in an array matches the given matcher.
- *
- * @param mixed $key as a {@link Hamcrest\Matcher} or a value.
- *
- * @return \Hamcrest\Arrays\IsArrayContainingKey
- */
- function hasKey($key)
- {
- return \Hamcrest\Arrays\IsArrayContainingKey::hasKeyInArray($key);
- }
-}
-
-if (!function_exists('hasKeyValuePair')) { /**
- * Test if an array has both an key and value in parity with each other.
- */
- function hasKeyValuePair($key, $value)
- {
- return \Hamcrest\Arrays\IsArrayContainingKeyValuePair::hasKeyValuePair($key, $value);
- }
-}
-
-if (!function_exists('hasEntry')) { /**
- * Test if an array has both an key and value in parity with each other.
- */
- function hasEntry($key, $value)
- {
- return \Hamcrest\Arrays\IsArrayContainingKeyValuePair::hasKeyValuePair($key, $value);
- }
-}
-
-if (!function_exists('arrayWithSize')) { /**
- * Does array size satisfy a given matcher?
- *
- * @param \Hamcrest\Matcher|int $size as a {@link Hamcrest\Matcher} or a value.
- *
- * @return \Hamcrest\Arrays\IsArrayWithSize
- */
- function arrayWithSize($size)
- {
- return \Hamcrest\Arrays\IsArrayWithSize::arrayWithSize($size);
- }
-}
-
-if (!function_exists('emptyArray')) { /**
- * Matches an empty array.
- */
- function emptyArray()
- {
- return \Hamcrest\Arrays\IsArrayWithSize::emptyArray();
- }
-}
-
-if (!function_exists('nonEmptyArray')) { /**
- * Matches an empty array.
- */
- function nonEmptyArray()
- {
- return \Hamcrest\Arrays\IsArrayWithSize::nonEmptyArray();
- }
-}
-
-if (!function_exists('emptyTraversable')) { /**
- * Returns true if traversable is empty.
- */
- function emptyTraversable()
- {
- return \Hamcrest\Collection\IsEmptyTraversable::emptyTraversable();
- }
-}
-
-if (!function_exists('nonEmptyTraversable')) { /**
- * Returns true if traversable is not empty.
- */
- function nonEmptyTraversable()
- {
- return \Hamcrest\Collection\IsEmptyTraversable::nonEmptyTraversable();
- }
-}
-
-if (!function_exists('traversableWithSize')) { /**
- * Does traversable size satisfy a given matcher?
- */
- function traversableWithSize($size)
- {
- return \Hamcrest\Collection\IsTraversableWithSize::traversableWithSize($size);
- }
-}
-
-if (!function_exists('allOf')) { /**
- * Evaluates to true only if ALL of the passed in matchers evaluate to true.
- */
- function allOf(/* args... */)
- {
- $args = func_get_args();
- return call_user_func_array(array('\Hamcrest\Core\AllOf', 'allOf'), $args);
- }
-}
-
-if (!function_exists('anyOf')) { /**
- * Evaluates to true if ANY of the passed in matchers evaluate to true.
- */
- function anyOf(/* args... */)
- {
- $args = func_get_args();
- return call_user_func_array(array('\Hamcrest\Core\AnyOf', 'anyOf'), $args);
- }
-}
-
-if (!function_exists('noneOf')) { /**
- * Evaluates to false if ANY of the passed in matchers evaluate to true.
- */
- function noneOf(/* args... */)
- {
- $args = func_get_args();
- return call_user_func_array(array('\Hamcrest\Core\AnyOf', 'noneOf'), $args);
- }
-}
-
-if (!function_exists('both')) { /**
- * This is useful for fluently combining matchers that must both pass.
- * For example:
- *
- * assertThat($string, both(containsString("a"))->andAlso(containsString("b")));
- *
- */
- function both(\Hamcrest\Matcher $matcher)
- {
- return \Hamcrest\Core\CombinableMatcher::both($matcher);
- }
-}
-
-if (!function_exists('either')) { /**
- * This is useful for fluently combining matchers where either may pass,
- * for example:
- *
- * assertThat($string, either(containsString("a"))->orElse(containsString("b")));
- *
- */
- function either(\Hamcrest\Matcher $matcher)
- {
- return \Hamcrest\Core\CombinableMatcher::either($matcher);
- }
-}
-
-if (!function_exists('describedAs')) { /**
- * Wraps an existing matcher and overrides the description when it fails.
- */
- function describedAs(/* args... */)
- {
- $args = func_get_args();
- return call_user_func_array(array('\Hamcrest\Core\DescribedAs', 'describedAs'), $args);
- }
-}
-
-if (!function_exists('everyItem')) { /**
- * @param Matcher $itemMatcher
- * A matcher to apply to every element in an array.
- *
- * @return \Hamcrest\Core\Every
- * Evaluates to TRUE for a collection in which every item matches $itemMatcher
- */
- function everyItem(\Hamcrest\Matcher $itemMatcher)
- {
- return \Hamcrest\Core\Every::everyItem($itemMatcher);
- }
-}
-
-if (!function_exists('hasToString')) { /**
- * Does array size satisfy a given matcher?
- */
- function hasToString($matcher)
- {
- return \Hamcrest\Core\HasToString::hasToString($matcher);
- }
-}
-
-if (!function_exists('is')) { /**
- * Decorates another Matcher, retaining the behavior but allowing tests
- * to be slightly more expressive.
- *
- * For example: assertThat($cheese, equalTo($smelly))
- * vs. assertThat($cheese, is(equalTo($smelly)))
- */
- function is($value)
- {
- return \Hamcrest\Core\Is::is($value);
- }
-}
-
-if (!function_exists('anything')) { /**
- * This matcher always evaluates to true.
- *
- * @param string $description A meaningful string used when describing itself.
- *
- * @return \Hamcrest\Core\IsAnything
- */
- function anything($description = 'ANYTHING')
- {
- return \Hamcrest\Core\IsAnything::anything($description);
- }
-}
-
-if (!function_exists('hasItem')) { /**
- * Test if the value is an array containing this matcher.
- *
- * Example:
- *
- * assertThat(array('a', 'b'), hasItem(equalTo('b')));
- * //Convenience defaults to equalTo()
- * assertThat(array('a', 'b'), hasItem('b'));
- *
- */
- function hasItem(/* args... */)
- {
- $args = func_get_args();
- return call_user_func_array(array('\Hamcrest\Core\IsCollectionContaining', 'hasItem'), $args);
- }
-}
-
-if (!function_exists('hasItems')) { /**
- * Test if the value is an array containing elements that match all of these
- * matchers.
- *
- * Example:
- *
- * assertThat(array('a', 'b', 'c'), hasItems(equalTo('a'), equalTo('b')));
- *
- */
- function hasItems(/* args... */)
- {
- $args = func_get_args();
- return call_user_func_array(array('\Hamcrest\Core\IsCollectionContaining', 'hasItems'), $args);
- }
-}
-
-if (!function_exists('equalTo')) { /**
- * Is the value equal to another value, as tested by the use of the "=="
- * comparison operator?
- */
- function equalTo($item)
- {
- return \Hamcrest\Core\IsEqual::equalTo($item);
- }
-}
-
-if (!function_exists('identicalTo')) { /**
- * Tests of the value is identical to $value as tested by the "===" operator.
- */
- function identicalTo($value)
- {
- return \Hamcrest\Core\IsIdentical::identicalTo($value);
- }
-}
-
-if (!function_exists('anInstanceOf')) { /**
- * Is the value an instance of a particular type?
- * This version assumes no relationship between the required type and
- * the signature of the method that sets it up, for example in
- * assertThat($anObject, anInstanceOf('Thing'));
- */
- function anInstanceOf($theClass)
- {
- return \Hamcrest\Core\IsInstanceOf::anInstanceOf($theClass);
- }
-}
-
-if (!function_exists('any')) { /**
- * Is the value an instance of a particular type?
- * This version assumes no relationship between the required type and
- * the signature of the method that sets it up, for example in
- * assertThat($anObject, anInstanceOf('Thing'));
- */
- function any($theClass)
- {
- return \Hamcrest\Core\IsInstanceOf::anInstanceOf($theClass);
- }
-}
-
-if (!function_exists('not')) { /**
- * Matches if value does not match $value.
- */
- function not($value)
- {
- return \Hamcrest\Core\IsNot::not($value);
- }
-}
-
-if (!function_exists('nullValue')) { /**
- * Matches if value is null.
- */
- function nullValue()
- {
- return \Hamcrest\Core\IsNull::nullValue();
- }
-}
-
-if (!function_exists('notNullValue')) { /**
- * Matches if value is not null.
- */
- function notNullValue()
- {
- return \Hamcrest\Core\IsNull::notNullValue();
- }
-}
-
-if (!function_exists('sameInstance')) { /**
- * Creates a new instance of IsSame.
- *
- * @param mixed $object
- * The predicate evaluates to true only when the argument is
- * this object.
- *
- * @return \Hamcrest\Core\IsSame
- */
- function sameInstance($object)
- {
- return \Hamcrest\Core\IsSame::sameInstance($object);
- }
-}
-
-if (!function_exists('typeOf')) { /**
- * Is the value a particular built-in type?
- */
- function typeOf($theType)
- {
- return \Hamcrest\Core\IsTypeOf::typeOf($theType);
- }
-}
-
-if (!function_exists('set')) { /**
- * Matches if value (class, object, or array) has named $property.
- */
- function set($property)
- {
- return \Hamcrest\Core\Set::set($property);
- }
-}
-
-if (!function_exists('notSet')) { /**
- * Matches if value (class, object, or array) does not have named $property.
- */
- function notSet($property)
- {
- return \Hamcrest\Core\Set::notSet($property);
- }
-}
-
-if (!function_exists('closeTo')) { /**
- * Matches if value is a number equal to $value within some range of
- * acceptable error $delta.
- */
- function closeTo($value, $delta)
- {
- return \Hamcrest\Number\IsCloseTo::closeTo($value, $delta);
- }
-}
-
-if (!function_exists('comparesEqualTo')) { /**
- * The value is not > $value, nor < $value.
- */
- function comparesEqualTo($value)
- {
- return \Hamcrest\Number\OrderingComparison::comparesEqualTo($value);
- }
-}
-
-if (!function_exists('greaterThan')) { /**
- * The value is > $value.
- */
- function greaterThan($value)
- {
- return \Hamcrest\Number\OrderingComparison::greaterThan($value);
- }
-}
-
-if (!function_exists('greaterThanOrEqualTo')) { /**
- * The value is >= $value.
- */
- function greaterThanOrEqualTo($value)
- {
- return \Hamcrest\Number\OrderingComparison::greaterThanOrEqualTo($value);
- }
-}
-
-if (!function_exists('atLeast')) { /**
- * The value is >= $value.
- */
- function atLeast($value)
- {
- return \Hamcrest\Number\OrderingComparison::greaterThanOrEqualTo($value);
- }
-}
-
-if (!function_exists('lessThan')) { /**
- * The value is < $value.
- */
- function lessThan($value)
- {
- return \Hamcrest\Number\OrderingComparison::lessThan($value);
- }
-}
-
-if (!function_exists('lessThanOrEqualTo')) { /**
- * The value is <= $value.
- */
- function lessThanOrEqualTo($value)
- {
- return \Hamcrest\Number\OrderingComparison::lessThanOrEqualTo($value);
- }
-}
-
-if (!function_exists('atMost')) { /**
- * The value is <= $value.
- */
- function atMost($value)
- {
- return \Hamcrest\Number\OrderingComparison::lessThanOrEqualTo($value);
- }
-}
-
-if (!function_exists('isEmptyString')) { /**
- * Matches if value is a zero-length string.
- */
- function isEmptyString()
- {
- return \Hamcrest\Text\IsEmptyString::isEmptyString();
- }
-}
-
-if (!function_exists('emptyString')) { /**
- * Matches if value is a zero-length string.
- */
- function emptyString()
- {
- return \Hamcrest\Text\IsEmptyString::isEmptyString();
- }
-}
-
-if (!function_exists('isEmptyOrNullString')) { /**
- * Matches if value is null or a zero-length string.
- */
- function isEmptyOrNullString()
- {
- return \Hamcrest\Text\IsEmptyString::isEmptyOrNullString();
- }
-}
-
-if (!function_exists('nullOrEmptyString')) { /**
- * Matches if value is null or a zero-length string.
- */
- function nullOrEmptyString()
- {
- return \Hamcrest\Text\IsEmptyString::isEmptyOrNullString();
- }
-}
-
-if (!function_exists('isNonEmptyString')) { /**
- * Matches if value is a non-zero-length string.
- */
- function isNonEmptyString()
- {
- return \Hamcrest\Text\IsEmptyString::isNonEmptyString();
- }
-}
-
-if (!function_exists('nonEmptyString')) { /**
- * Matches if value is a non-zero-length string.
- */
- function nonEmptyString()
- {
- return \Hamcrest\Text\IsEmptyString::isNonEmptyString();
- }
-}
-
-if (!function_exists('equalToIgnoringCase')) { /**
- * Matches if value is a string equal to $string, regardless of the case.
- */
- function equalToIgnoringCase($string)
- {
- return \Hamcrest\Text\IsEqualIgnoringCase::equalToIgnoringCase($string);
- }
-}
-
-if (!function_exists('equalToIgnoringWhiteSpace')) { /**
- * Matches if value is a string equal to $string, regardless of whitespace.
- */
- function equalToIgnoringWhiteSpace($string)
- {
- return \Hamcrest\Text\IsEqualIgnoringWhiteSpace::equalToIgnoringWhiteSpace($string);
- }
-}
-
-if (!function_exists('matchesPattern')) { /**
- * Matches if value is a string that matches regular expression $pattern.
- */
- function matchesPattern($pattern)
- {
- return \Hamcrest\Text\MatchesPattern::matchesPattern($pattern);
- }
-}
-
-if (!function_exists('containsString')) { /**
- * Matches if value is a string that contains $substring.
- */
- function containsString($substring)
- {
- return \Hamcrest\Text\StringContains::containsString($substring);
- }
-}
-
-if (!function_exists('containsStringIgnoringCase')) { /**
- * Matches if value is a string that contains $substring regardless of the case.
- */
- function containsStringIgnoringCase($substring)
- {
- return \Hamcrest\Text\StringContainsIgnoringCase::containsStringIgnoringCase($substring);
- }
-}
-
-if (!function_exists('stringContainsInOrder')) { /**
- * Matches if value contains $substrings in a constrained order.
- */
- function stringContainsInOrder(/* args... */)
- {
- $args = func_get_args();
- return call_user_func_array(array('\Hamcrest\Text\StringContainsInOrder', 'stringContainsInOrder'), $args);
- }
-}
-
-if (!function_exists('endsWith')) { /**
- * Matches if value is a string that ends with $substring.
- */
- function endsWith($substring)
- {
- return \Hamcrest\Text\StringEndsWith::endsWith($substring);
- }
-}
-
-if (!function_exists('startsWith')) { /**
- * Matches if value is a string that starts with $substring.
- */
- function startsWith($substring)
- {
- return \Hamcrest\Text\StringStartsWith::startsWith($substring);
- }
-}
-
-if (!function_exists('arrayValue')) { /**
- * Is the value an array?
- */
- function arrayValue()
- {
- return \Hamcrest\Type\IsArray::arrayValue();
- }
-}
-
-if (!function_exists('booleanValue')) { /**
- * Is the value a boolean?
- */
- function booleanValue()
- {
- return \Hamcrest\Type\IsBoolean::booleanValue();
- }
-}
-
-if (!function_exists('boolValue')) { /**
- * Is the value a boolean?
- */
- function boolValue()
- {
- return \Hamcrest\Type\IsBoolean::booleanValue();
- }
-}
-
-if (!function_exists('callableValue')) { /**
- * Is the value callable?
- */
- function callableValue()
- {
- return \Hamcrest\Type\IsCallable::callableValue();
- }
-}
-
-if (!function_exists('doubleValue')) { /**
- * Is the value a float/double?
- */
- function doubleValue()
- {
- return \Hamcrest\Type\IsDouble::doubleValue();
- }
-}
-
-if (!function_exists('floatValue')) { /**
- * Is the value a float/double?
- */
- function floatValue()
- {
- return \Hamcrest\Type\IsDouble::doubleValue();
- }
-}
-
-if (!function_exists('integerValue')) { /**
- * Is the value an integer?
- */
- function integerValue()
- {
- return \Hamcrest\Type\IsInteger::integerValue();
- }
-}
-
-if (!function_exists('intValue')) { /**
- * Is the value an integer?
- */
- function intValue()
- {
- return \Hamcrest\Type\IsInteger::integerValue();
- }
-}
-
-if (!function_exists('numericValue')) { /**
- * Is the value a numeric?
- */
- function numericValue()
- {
- return \Hamcrest\Type\IsNumeric::numericValue();
- }
-}
-
-if (!function_exists('objectValue')) { /**
- * Is the value an object?
- */
- function objectValue()
- {
- return \Hamcrest\Type\IsObject::objectValue();
- }
-}
-
-if (!function_exists('anObject')) { /**
- * Is the value an object?
- */
- function anObject()
- {
- return \Hamcrest\Type\IsObject::objectValue();
- }
-}
-
-if (!function_exists('resourceValue')) { /**
- * Is the value a resource?
- */
- function resourceValue()
- {
- return \Hamcrest\Type\IsResource::resourceValue();
- }
-}
-
-if (!function_exists('scalarValue')) { /**
- * Is the value a scalar (boolean, integer, double, or string)?
- */
- function scalarValue()
- {
- return \Hamcrest\Type\IsScalar::scalarValue();
- }
-}
-
-if (!function_exists('stringValue')) { /**
- * Is the value a string?
- */
- function stringValue()
- {
- return \Hamcrest\Type\IsString::stringValue();
- }
-}
-
-if (!function_exists('hasXPath')) { /**
- * Wraps $matcher
with {@link Hamcrest\Core\IsEqual)
- * if it's not a matcher and the XPath in count()
- * if it's an integer.
- */
- function hasXPath($xpath, $matcher = null)
- {
- return \Hamcrest\Xml\HasXPath::hasXPath($xpath, $matcher);
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArray.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArray.php
deleted file mode 100644
index 9ea569703bd..00000000000
--- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArray.php
+++ /dev/null
@@ -1,118 +0,0 @@
-_elementMatchers = $elementMatchers;
- }
-
- protected function matchesSafely($array)
- {
- if (array_keys($array) != array_keys($this->_elementMatchers)) {
- return false;
- }
-
- /** @var $matcher \Hamcrest\Matcher */
- foreach ($this->_elementMatchers as $k => $matcher) {
- if (!$matcher->matches($array[$k])) {
- return false;
- }
- }
-
- return true;
- }
-
- protected function describeMismatchSafely($actual, Description $mismatchDescription)
- {
- if (count($actual) != count($this->_elementMatchers)) {
- $mismatchDescription->appendText('array length was ' . count($actual));
-
- return;
- } elseif (array_keys($actual) != array_keys($this->_elementMatchers)) {
- $mismatchDescription->appendText('array keys were ')
- ->appendValueList(
- $this->descriptionStart(),
- $this->descriptionSeparator(),
- $this->descriptionEnd(),
- array_keys($actual)
- )
- ;
-
- return;
- }
-
- /** @var $matcher \Hamcrest\Matcher */
- foreach ($this->_elementMatchers as $k => $matcher) {
- if (!$matcher->matches($actual[$k])) {
- $mismatchDescription->appendText('element ')->appendValue($k)
- ->appendText(' was ')->appendValue($actual[$k]);
-
- return;
- }
- }
- }
-
- public function describeTo(Description $description)
- {
- $description->appendList(
- $this->descriptionStart(),
- $this->descriptionSeparator(),
- $this->descriptionEnd(),
- $this->_elementMatchers
- );
- }
-
- /**
- * Evaluates to true only if each $matcher[$i] is satisfied by $array[$i].
- *
- * @factory ...
- */
- public static function anArray(/* args... */)
- {
- $args = func_get_args();
-
- return new self(Util::createMatcherArray($args));
- }
-
- // -- Protected Methods
-
- protected function descriptionStart()
- {
- return '[';
- }
-
- protected function descriptionSeparator()
- {
- return ', ';
- }
-
- protected function descriptionEnd()
- {
- return ']';
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContaining.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContaining.php
deleted file mode 100644
index 0e4a1eda9ee..00000000000
--- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContaining.php
+++ /dev/null
@@ -1,63 +0,0 @@
-_elementMatcher = $elementMatcher;
- }
-
- protected function matchesSafely($array)
- {
- foreach ($array as $element) {
- if ($this->_elementMatcher->matches($element)) {
- return true;
- }
- }
-
- return false;
- }
-
- protected function describeMismatchSafely($array, Description $mismatchDescription)
- {
- $mismatchDescription->appendText('was ')->appendValue($array);
- }
-
- public function describeTo(Description $description)
- {
- $description
- ->appendText('an array containing ')
- ->appendDescriptionOf($this->_elementMatcher)
- ;
- }
-
- /**
- * Evaluates to true if any item in an array satisfies the given matcher.
- *
- * @param mixed $item as a {@link Hamcrest\Matcher} or a value.
- *
- * @return \Hamcrest\Arrays\IsArrayContaining
- * @factory hasValue
- */
- public static function hasItemInArray($item)
- {
- return new self(Util::wrapValueWithIsEqual($item));
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingInAnyOrder.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingInAnyOrder.php
deleted file mode 100644
index 9009026b834..00000000000
--- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingInAnyOrder.php
+++ /dev/null
@@ -1,59 +0,0 @@
-_elementMatchers = $elementMatchers;
- }
-
- protected function matchesSafelyWithDiagnosticDescription($array, Description $mismatchDescription)
- {
- $matching = new MatchingOnce($this->_elementMatchers, $mismatchDescription);
-
- foreach ($array as $element) {
- if (!$matching->matches($element)) {
- return false;
- }
- }
-
- return $matching->isFinished($array);
- }
-
- public function describeTo(Description $description)
- {
- $description->appendList('[', ', ', ']', $this->_elementMatchers)
- ->appendText(' in any order')
- ;
- }
-
- /**
- * An array with elements that match the given matchers.
- *
- * @factory containsInAnyOrder ...
- */
- public static function arrayContainingInAnyOrder(/* args... */)
- {
- $args = func_get_args();
-
- return new self(Util::createMatcherArray($args));
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingInOrder.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingInOrder.php
deleted file mode 100644
index 6115740451c..00000000000
--- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingInOrder.php
+++ /dev/null
@@ -1,57 +0,0 @@
-_elementMatchers = $elementMatchers;
- }
-
- protected function matchesSafelyWithDiagnosticDescription($array, Description $mismatchDescription)
- {
- $series = new SeriesMatchingOnce($this->_elementMatchers, $mismatchDescription);
-
- foreach ($array as $element) {
- if (!$series->matches($element)) {
- return false;
- }
- }
-
- return $series->isFinished();
- }
-
- public function describeTo(Description $description)
- {
- $description->appendList('[', ', ', ']', $this->_elementMatchers);
- }
-
- /**
- * An array with elements that match the given matchers in the same order.
- *
- * @factory contains ...
- */
- public static function arrayContaining(/* args... */)
- {
- $args = func_get_args();
-
- return new self(Util::createMatcherArray($args));
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingKey.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingKey.php
deleted file mode 100644
index 523477e7bec..00000000000
--- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingKey.php
+++ /dev/null
@@ -1,75 +0,0 @@
-_keyMatcher = $keyMatcher;
- }
-
- protected function matchesSafely($array)
- {
- foreach ($array as $key => $element) {
- if ($this->_keyMatcher->matches($key)) {
- return true;
- }
- }
-
- return false;
- }
-
- protected function describeMismatchSafely($array, Description $mismatchDescription)
- {
- //Not using appendValueList() so that keys can be shown
- $mismatchDescription->appendText('array was ')
- ->appendText('[')
- ;
- $loop = false;
- foreach ($array as $key => $value) {
- if ($loop) {
- $mismatchDescription->appendText(', ');
- }
- $mismatchDescription->appendValue($key)->appendText(' => ')->appendValue($value);
- $loop = true;
- }
- $mismatchDescription->appendText(']');
- }
-
- public function describeTo(Description $description)
- {
- $description
- ->appendText('array with key ')
- ->appendDescriptionOf($this->_keyMatcher)
- ;
- }
-
- /**
- * Evaluates to true if any key in an array matches the given matcher.
- *
- * @param mixed $key as a {@link Hamcrest\Matcher} or a value.
- *
- * @return \Hamcrest\Arrays\IsArrayContainingKey
- * @factory hasKey
- */
- public static function hasKeyInArray($key)
- {
- return new self(Util::wrapValueWithIsEqual($key));
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingKeyValuePair.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingKeyValuePair.php
deleted file mode 100644
index 9ac3eba80ee..00000000000
--- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingKeyValuePair.php
+++ /dev/null
@@ -1,80 +0,0 @@
-_keyMatcher = $keyMatcher;
- $this->_valueMatcher = $valueMatcher;
- }
-
- protected function matchesSafely($array)
- {
- foreach ($array as $key => $value) {
- if ($this->_keyMatcher->matches($key) && $this->_valueMatcher->matches($value)) {
- return true;
- }
- }
-
- return false;
- }
-
- protected function describeMismatchSafely($array, Description $mismatchDescription)
- {
- //Not using appendValueList() so that keys can be shown
- $mismatchDescription->appendText('array was ')
- ->appendText('[')
- ;
- $loop = false;
- foreach ($array as $key => $value) {
- if ($loop) {
- $mismatchDescription->appendText(', ');
- }
- $mismatchDescription->appendValue($key)->appendText(' => ')->appendValue($value);
- $loop = true;
- }
- $mismatchDescription->appendText(']');
- }
-
- public function describeTo(Description $description)
- {
- $description->appendText('array containing [')
- ->appendDescriptionOf($this->_keyMatcher)
- ->appendText(' => ')
- ->appendDescriptionOf($this->_valueMatcher)
- ->appendText(']')
- ;
- }
-
- /**
- * Test if an array has both an key and value in parity with each other.
- *
- * @factory hasEntry
- */
- public static function hasKeyValuePair($key, $value)
- {
- return new self(
- Util::wrapValueWithIsEqual($key),
- Util::wrapValueWithIsEqual($value)
- );
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayWithSize.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayWithSize.php
deleted file mode 100644
index 074375ce1c8..00000000000
--- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayWithSize.php
+++ /dev/null
@@ -1,73 +0,0 @@
-_elementMatchers = $elementMatchers;
- $this->_mismatchDescription = $mismatchDescription;
- }
-
- public function matches($item)
- {
- return $this->_isNotSurplus($item) && $this->_isMatched($item);
- }
-
- public function isFinished($items)
- {
- if (empty($this->_elementMatchers)) {
- return true;
- }
-
- $this->_mismatchDescription
- ->appendText('No item matches: ')->appendList('', ', ', '', $this->_elementMatchers)
- ->appendText(' in ')->appendValueList('[', ', ', ']', $items)
- ;
-
- return false;
- }
-
- // -- Private Methods
-
- private function _isNotSurplus($item)
- {
- if (empty($this->_elementMatchers)) {
- $this->_mismatchDescription->appendText('Not matched: ')->appendValue($item);
-
- return false;
- }
-
- return true;
- }
-
- private function _isMatched($item)
- {
- /** @var $matcher \Hamcrest\Matcher */
- foreach ($this->_elementMatchers as $i => $matcher) {
- if ($matcher->matches($item)) {
- unset($this->_elementMatchers[$i]);
-
- return true;
- }
- }
-
- $this->_mismatchDescription->appendText('Not matched: ')->appendValue($item);
-
- return false;
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/SeriesMatchingOnce.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/SeriesMatchingOnce.php
deleted file mode 100644
index 12a912d862f..00000000000
--- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/SeriesMatchingOnce.php
+++ /dev/null
@@ -1,75 +0,0 @@
-_elementMatchers = $elementMatchers;
- $this->_keys = array_keys($elementMatchers);
- $this->_mismatchDescription = $mismatchDescription;
- }
-
- public function matches($item)
- {
- return $this->_isNotSurplus($item) && $this->_isMatched($item);
- }
-
- public function isFinished()
- {
- if (!empty($this->_elementMatchers)) {
- $nextMatcher = current($this->_elementMatchers);
- $this->_mismatchDescription->appendText('No item matched: ')->appendDescriptionOf($nextMatcher);
-
- return false;
- }
-
- return true;
- }
-
- // -- Private Methods
-
- private function _isNotSurplus($item)
- {
- if (empty($this->_elementMatchers)) {
- $this->_mismatchDescription->appendText('Not matched: ')->appendValue($item);
-
- return false;
- }
-
- return true;
- }
-
- private function _isMatched($item)
- {
- $this->_nextMatchKey = array_shift($this->_keys);
- $nextMatcher = array_shift($this->_elementMatchers);
-
- if (!$nextMatcher->matches($item)) {
- $this->_describeMismatch($nextMatcher, $item);
-
- return false;
- }
-
- return true;
- }
-
- private function _describeMismatch(Matcher $matcher, $item)
- {
- $this->_mismatchDescription->appendText('item with key ' . $this->_nextMatchKey . ': ');
- $matcher->describeMismatch($item, $this->_mismatchDescription);
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/AssertionError.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/AssertionError.php
deleted file mode 100644
index 3a2a0e7c235..00000000000
--- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/AssertionError.php
+++ /dev/null
@@ -1,10 +0,0 @@
-append($text);
-
- return $this;
- }
-
- public function appendDescriptionOf(SelfDescribing $value)
- {
- $value->describeTo($this);
-
- return $this;
- }
-
- public function appendValue($value)
- {
- if (is_null($value)) {
- $this->append('null');
- } elseif (is_string($value)) {
- $this->_toPhpSyntax($value);
- } elseif (is_float($value)) {
- $this->append('<');
- $this->append($value);
- $this->append('F>');
- } elseif (is_bool($value)) {
- $this->append('<');
- $this->append($value ? 'true' : 'false');
- $this->append('>');
- } elseif (is_array($value) || $value instanceof \Iterator || $value instanceof \IteratorAggregate) {
- $this->appendValueList('[', ', ', ']', $value);
- } elseif (is_object($value) && !method_exists($value, '__toString')) {
- $this->append('<');
- $this->append(get_class($value));
- $this->append('>');
- } else {
- $this->append('<');
- $this->append($value);
- $this->append('>');
- }
-
- return $this;
- }
-
- public function appendValueList($start, $separator, $end, $values)
- {
- $list = array();
- foreach ($values as $v) {
- $list[] = new SelfDescribingValue($v);
- }
-
- $this->appendList($start, $separator, $end, $list);
-
- return $this;
- }
-
- public function appendList($start, $separator, $end, $values)
- {
- $this->append($start);
-
- $separate = false;
-
- foreach ($values as $value) {
- /*if (!($value instanceof Hamcrest\SelfDescribing)) {
- $value = new Hamcrest\Internal\SelfDescribingValue($value);
- }*/
-
- if ($separate) {
- $this->append($separator);
- }
-
- $this->appendDescriptionOf($value);
-
- $separate = true;
- }
-
- $this->append($end);
-
- return $this;
- }
-
- // -- Protected Methods
-
- /**
- * Append the String $str to the description.
- */
- abstract protected function append($str);
-
- // -- Private Methods
-
- private function _toPhpSyntax($value)
- {
- $str = '"';
- for ($i = 0, $len = strlen($value); $i < $len; ++$i) {
- switch ($value[$i]) {
- case '"':
- $str .= '\\"';
- break;
-
- case "\t":
- $str .= '\\t';
- break;
-
- case "\r":
- $str .= '\\r';
- break;
-
- case "\n":
- $str .= '\\n';
- break;
-
- default:
- $str .= $value[$i];
- }
- }
- $str .= '"';
- $this->append($str);
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/BaseMatcher.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/BaseMatcher.php
deleted file mode 100644
index 286db3e17f2..00000000000
--- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/BaseMatcher.php
+++ /dev/null
@@ -1,25 +0,0 @@
-appendText('was ')->appendValue($item);
- }
-
- public function __toString()
- {
- return StringDescription::toString($this);
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Collection/IsEmptyTraversable.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Collection/IsEmptyTraversable.php
deleted file mode 100644
index 8ab58ea5a19..00000000000
--- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Collection/IsEmptyTraversable.php
+++ /dev/null
@@ -1,71 +0,0 @@
-_empty = $empty;
- }
-
- public function matches($item)
- {
- if (!$item instanceof \Traversable) {
- return false;
- }
-
- foreach ($item as $value) {
- return !$this->_empty;
- }
-
- return $this->_empty;
- }
-
- public function describeTo(Description $description)
- {
- $description->appendText($this->_empty ? 'an empty traversable' : 'a non-empty traversable');
- }
-
- /**
- * Returns true if traversable is empty.
- *
- * @factory
- */
- public static function emptyTraversable()
- {
- if (!self::$_INSTANCE) {
- self::$_INSTANCE = new self;
- }
-
- return self::$_INSTANCE;
- }
-
- /**
- * Returns true if traversable is not empty.
- *
- * @factory
- */
- public static function nonEmptyTraversable()
- {
- if (!self::$_NOT_INSTANCE) {
- self::$_NOT_INSTANCE = new self(false);
- }
-
- return self::$_NOT_INSTANCE;
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Collection/IsTraversableWithSize.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Collection/IsTraversableWithSize.php
deleted file mode 100644
index c95edc5c339..00000000000
--- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Collection/IsTraversableWithSize.php
+++ /dev/null
@@ -1,47 +0,0 @@
-false.
- */
-class AllOf extends DiagnosingMatcher
-{
-
- private $_matchers;
-
- public function __construct(array $matchers)
- {
- Util::checkAllAreMatchers($matchers);
-
- $this->_matchers = $matchers;
- }
-
- public function matchesWithDiagnosticDescription($item, Description $mismatchDescription)
- {
- /** @var $matcher \Hamcrest\Matcher */
- foreach ($this->_matchers as $matcher) {
- if (!$matcher->matches($item)) {
- $mismatchDescription->appendDescriptionOf($matcher)->appendText(' ');
- $matcher->describeMismatch($item, $mismatchDescription);
-
- return false;
- }
- }
-
- return true;
- }
-
- public function describeTo(Description $description)
- {
- $description->appendList('(', ' and ', ')', $this->_matchers);
- }
-
- /**
- * Evaluates to true only if ALL of the passed in matchers evaluate to true.
- *
- * @factory ...
- */
- public static function allOf(/* args... */)
- {
- $args = func_get_args();
-
- return new self(Util::createMatcherArray($args));
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/AnyOf.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/AnyOf.php
deleted file mode 100644
index 4504279f336..00000000000
--- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/AnyOf.php
+++ /dev/null
@@ -1,58 +0,0 @@
-true.
- */
-class AnyOf extends ShortcutCombination
-{
-
- public function __construct(array $matchers)
- {
- parent::__construct($matchers);
- }
-
- public function matches($item)
- {
- return $this->matchesWithShortcut($item, true);
- }
-
- public function describeTo(Description $description)
- {
- $this->describeToWithOperator($description, 'or');
- }
-
- /**
- * Evaluates to true if ANY of the passed in matchers evaluate to true.
- *
- * @factory ...
- */
- public static function anyOf(/* args... */)
- {
- $args = func_get_args();
-
- return new self(Util::createMatcherArray($args));
- }
-
- /**
- * Evaluates to false if ANY of the passed in matchers evaluate to true.
- *
- * @factory ...
- */
- public static function noneOf(/* args... */)
- {
- $args = func_get_args();
-
- return IsNot::not(
- new self(Util::createMatcherArray($args))
- );
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/CombinableMatcher.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/CombinableMatcher.php
deleted file mode 100644
index e3b4aa7822f..00000000000
--- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/CombinableMatcher.php
+++ /dev/null
@@ -1,78 +0,0 @@
-_matcher = $matcher;
- }
-
- public function matches($item)
- {
- return $this->_matcher->matches($item);
- }
-
- public function describeTo(Description $description)
- {
- $description->appendDescriptionOf($this->_matcher);
- }
-
- /** Diversion from Hamcrest-Java... Logical "and" not permitted */
- public function andAlso(Matcher $other)
- {
- return new self(new AllOf($this->_templatedListWith($other)));
- }
-
- /** Diversion from Hamcrest-Java... Logical "or" not permitted */
- public function orElse(Matcher $other)
- {
- return new self(new AnyOf($this->_templatedListWith($other)));
- }
-
- /**
- * This is useful for fluently combining matchers that must both pass.
- * For example:
- *
- * assertThat($string, both(containsString("a"))->andAlso(containsString("b")));
- *
- *
- * @factory
- */
- public static function both(Matcher $matcher)
- {
- return new self($matcher);
- }
-
- /**
- * This is useful for fluently combining matchers where either may pass,
- * for example:
- *
- * assertThat($string, either(containsString("a"))->orElse(containsString("b")));
- *
- *
- * @factory
- */
- public static function either(Matcher $matcher)
- {
- return new self($matcher);
- }
-
- // -- Private Methods
-
- private function _templatedListWith(Matcher $other)
- {
- return array($this->_matcher, $other);
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/DescribedAs.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/DescribedAs.php
deleted file mode 100644
index 5b2583fa786..00000000000
--- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/DescribedAs.php
+++ /dev/null
@@ -1,68 +0,0 @@
-_descriptionTemplate = $descriptionTemplate;
- $this->_matcher = $matcher;
- $this->_values = $values;
- }
-
- public function matches($item)
- {
- return $this->_matcher->matches($item);
- }
-
- public function describeTo(Description $description)
- {
- $textStart = 0;
- while (preg_match(self::ARG_PATTERN, $this->_descriptionTemplate, $matches, PREG_OFFSET_CAPTURE, $textStart)) {
- $text = $matches[0][0];
- $index = $matches[1][0];
- $offset = $matches[0][1];
-
- $description->appendText(substr($this->_descriptionTemplate, $textStart, $offset - $textStart));
- $description->appendValue($this->_values[$index]);
-
- $textStart = $offset + strlen($text);
- }
-
- if ($textStart < strlen($this->_descriptionTemplate)) {
- $description->appendText(substr($this->_descriptionTemplate, $textStart));
- }
- }
-
- /**
- * Wraps an existing matcher and overrides the description when it fails.
- *
- * @factory ...
- */
- public static function describedAs(/* $description, Hamcrest\Matcher $matcher, $values... */)
- {
- $args = func_get_args();
- $description = array_shift($args);
- $matcher = array_shift($args);
- $values = $args;
-
- return new self($description, $matcher, $values);
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Every.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Every.php
deleted file mode 100644
index d686f8dac0b..00000000000
--- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Every.php
+++ /dev/null
@@ -1,56 +0,0 @@
-_matcher = $matcher;
- }
-
- protected function matchesSafelyWithDiagnosticDescription($items, Description $mismatchDescription)
- {
- foreach ($items as $item) {
- if (!$this->_matcher->matches($item)) {
- $mismatchDescription->appendText('an item ');
- $this->_matcher->describeMismatch($item, $mismatchDescription);
-
- return false;
- }
- }
-
- return true;
- }
-
- public function describeTo(Description $description)
- {
- $description->appendText('every item is ')->appendDescriptionOf($this->_matcher);
- }
-
- /**
- * @param Matcher $itemMatcher
- * A matcher to apply to every element in an array.
- *
- * @return \Hamcrest\Core\Every
- * Evaluates to TRUE for a collection in which every item matches $itemMatcher
- *
- * @factory
- */
- public static function everyItem(Matcher $itemMatcher)
- {
- return new self($itemMatcher);
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/HasToString.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/HasToString.php
deleted file mode 100644
index 45bd9102e89..00000000000
--- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/HasToString.php
+++ /dev/null
@@ -1,56 +0,0 @@
-toString();
- }
-
- return (string) $actual;
- }
-
- /**
- * Does array size satisfy a given matcher?
- *
- * @factory
- */
- public static function hasToString($matcher)
- {
- return new self(Util::wrapValueWithIsEqual($matcher));
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Is.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Is.php
deleted file mode 100644
index 41266dc1fc1..00000000000
--- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Is.php
+++ /dev/null
@@ -1,57 +0,0 @@
-_matcher = $matcher;
- }
-
- public function matches($arg)
- {
- return $this->_matcher->matches($arg);
- }
-
- public function describeTo(Description $description)
- {
- $description->appendText('is ')->appendDescriptionOf($this->_matcher);
- }
-
- public function describeMismatch($item, Description $mismatchDescription)
- {
- $this->_matcher->describeMismatch($item, $mismatchDescription);
- }
-
- /**
- * Decorates another Matcher, retaining the behavior but allowing tests
- * to be slightly more expressive.
- *
- * For example: assertThat($cheese, equalTo($smelly))
- * vs. assertThat($cheese, is(equalTo($smelly)))
- *
- * @factory
- */
- public static function is($value)
- {
- return new self(Util::wrapValueWithIsEqual($value));
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsAnything.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsAnything.php
deleted file mode 100644
index f20e6c0dcf1..00000000000
--- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsAnything.php
+++ /dev/null
@@ -1,45 +0,0 @@
-true.
- */
-class IsAnything extends BaseMatcher
-{
-
- private $_message;
-
- public function __construct($message = 'ANYTHING')
- {
- $this->_message = $message;
- }
-
- public function matches($item)
- {
- return true;
- }
-
- public function describeTo(Description $description)
- {
- $description->appendText($this->_message);
- }
-
- /**
- * This matcher always evaluates to true.
- *
- * @param string $description A meaningful string used when describing itself.
- *
- * @return \Hamcrest\Core\IsAnything
- * @factory
- */
- public static function anything($description = 'ANYTHING')
- {
- return new self($description);
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsCollectionContaining.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsCollectionContaining.php
deleted file mode 100644
index 5e60426d1dd..00000000000
--- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsCollectionContaining.php
+++ /dev/null
@@ -1,93 +0,0 @@
-_elementMatcher = $elementMatcher;
- }
-
- protected function matchesSafely($items)
- {
- foreach ($items as $item) {
- if ($this->_elementMatcher->matches($item)) {
- return true;
- }
- }
-
- return false;
- }
-
- protected function describeMismatchSafely($items, Description $mismatchDescription)
- {
- $mismatchDescription->appendText('was ')->appendValue($items);
- }
-
- public function describeTo(Description $description)
- {
- $description
- ->appendText('a collection containing ')
- ->appendDescriptionOf($this->_elementMatcher)
- ;
- }
-
- /**
- * Test if the value is an array containing this matcher.
- *
- * Example:
- *
- * assertThat(array('a', 'b'), hasItem(equalTo('b')));
- * //Convenience defaults to equalTo()
- * assertThat(array('a', 'b'), hasItem('b'));
- *
- *
- * @factory ...
- */
- public static function hasItem()
- {
- $args = func_get_args();
- $firstArg = array_shift($args);
-
- return new self(Util::wrapValueWithIsEqual($firstArg));
- }
-
- /**
- * Test if the value is an array containing elements that match all of these
- * matchers.
- *
- * Example:
- *
- * assertThat(array('a', 'b', 'c'), hasItems(equalTo('a'), equalTo('b')));
- *
- *
- * @factory ...
- */
- public static function hasItems(/* args... */)
- {
- $args = func_get_args();
- $matchers = array();
-
- foreach ($args as $arg) {
- $matchers[] = self::hasItem($arg);
- }
-
- return AllOf::allOf($matchers);
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsEqual.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsEqual.php
deleted file mode 100644
index 523fba0b10d..00000000000
--- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsEqual.php
+++ /dev/null
@@ -1,44 +0,0 @@
-_item = $item;
- }
-
- public function matches($arg)
- {
- return (($arg == $this->_item) && ($this->_item == $arg));
- }
-
- public function describeTo(Description $description)
- {
- $description->appendValue($this->_item);
- }
-
- /**
- * Is the value equal to another value, as tested by the use of the "=="
- * comparison operator?
- *
- * @factory
- */
- public static function equalTo($item)
- {
- return new self($item);
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsIdentical.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsIdentical.php
deleted file mode 100644
index 28f7b36eacd..00000000000
--- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsIdentical.php
+++ /dev/null
@@ -1,38 +0,0 @@
-_value = $value;
- }
-
- public function describeTo(Description $description)
- {
- $description->appendValue($this->_value);
- }
-
- /**
- * Tests of the value is identical to $value as tested by the "===" operator.
- *
- * @factory
- */
- public static function identicalTo($value)
- {
- return new self($value);
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsInstanceOf.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsInstanceOf.php
deleted file mode 100644
index 7a5c92a6bfd..00000000000
--- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsInstanceOf.php
+++ /dev/null
@@ -1,67 +0,0 @@
-_theClass = $theClass;
- }
-
- protected function matchesWithDiagnosticDescription($item, Description $mismatchDescription)
- {
- if (!is_object($item)) {
- $mismatchDescription->appendText('was ')->appendValue($item);
-
- return false;
- }
-
- if (!($item instanceof $this->_theClass)) {
- $mismatchDescription->appendText('[' . get_class($item) . '] ')
- ->appendValue($item);
-
- return false;
- }
-
- return true;
- }
-
- public function describeTo(Description $description)
- {
- $description->appendText('an instance of ')
- ->appendText($this->_theClass)
- ;
- }
-
- /**
- * Is the value an instance of a particular type?
- * This version assumes no relationship between the required type and
- * the signature of the method that sets it up, for example in
- * assertThat($anObject, anInstanceOf('Thing'));
- *
- * @factory any
- */
- public static function anInstanceOf($theClass)
- {
- return new self($theClass);
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsNot.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsNot.php
deleted file mode 100644
index 167f0d0634d..00000000000
--- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsNot.php
+++ /dev/null
@@ -1,44 +0,0 @@
-_matcher = $matcher;
- }
-
- public function matches($arg)
- {
- return !$this->_matcher->matches($arg);
- }
-
- public function describeTo(Description $description)
- {
- $description->appendText('not ')->appendDescriptionOf($this->_matcher);
- }
-
- /**
- * Matches if value does not match $value.
- *
- * @factory
- */
- public static function not($value)
- {
- return new self(Util::wrapValueWithIsEqual($value));
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsNull.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsNull.php
deleted file mode 100644
index 91a454c17d3..00000000000
--- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsNull.php
+++ /dev/null
@@ -1,56 +0,0 @@
-appendText('null');
- }
-
- /**
- * Matches if value is null.
- *
- * @factory
- */
- public static function nullValue()
- {
- if (!self::$_INSTANCE) {
- self::$_INSTANCE = new self();
- }
-
- return self::$_INSTANCE;
- }
-
- /**
- * Matches if value is not null.
- *
- * @factory
- */
- public static function notNullValue()
- {
- if (!self::$_NOT_INSTANCE) {
- self::$_NOT_INSTANCE = IsNot::not(self::nullValue());
- }
-
- return self::$_NOT_INSTANCE;
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsSame.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsSame.php
deleted file mode 100644
index 8107870504e..00000000000
--- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsSame.php
+++ /dev/null
@@ -1,51 +0,0 @@
-_object = $object;
- }
-
- public function matches($object)
- {
- return ($object === $this->_object) && ($this->_object === $object);
- }
-
- public function describeTo(Description $description)
- {
- $description->appendText('sameInstance(')
- ->appendValue($this->_object)
- ->appendText(')')
- ;
- }
-
- /**
- * Creates a new instance of IsSame.
- *
- * @param mixed $object
- * The predicate evaluates to true only when the argument is
- * this object.
- *
- * @return \Hamcrest\Core\IsSame
- * @factory
- */
- public static function sameInstance($object)
- {
- return new self($object);
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsTypeOf.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsTypeOf.php
deleted file mode 100644
index d24f0f94c53..00000000000
--- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsTypeOf.php
+++ /dev/null
@@ -1,71 +0,0 @@
-_theType = strtolower($theType);
- }
-
- public function matches($item)
- {
- return strtolower(gettype($item)) == $this->_theType;
- }
-
- public function describeTo(Description $description)
- {
- $description->appendText(self::getTypeDescription($this->_theType));
- }
-
- public function describeMismatch($item, Description $description)
- {
- if ($item === null) {
- $description->appendText('was null');
- } else {
- $description->appendText('was ')
- ->appendText(self::getTypeDescription(strtolower(gettype($item))))
- ->appendText(' ')
- ->appendValue($item)
- ;
- }
- }
-
- public static function getTypeDescription($type)
- {
- if ($type == 'null') {
- return 'null';
- }
-
- return (strpos('aeiou', substr($type, 0, 1)) === false ? 'a ' : 'an ')
- . $type;
- }
-
- /**
- * Is the value a particular built-in type?
- *
- * @factory
- */
- public static function typeOf($theType)
- {
- return new self($theType);
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Set.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Set.php
deleted file mode 100644
index cdc45d538b6..00000000000
--- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Set.php
+++ /dev/null
@@ -1,95 +0,0 @@
-
- * assertThat(array('a', 'b'), set('b'));
- * assertThat($foo, set('bar'));
- * assertThat('Server', notSet('defaultPort'));
- *
- *
- * @todo Replace $property with a matcher and iterate all property names.
- */
-class Set extends BaseMatcher
-{
-
- private $_property;
- private $_not;
-
- public function __construct($property, $not = false)
- {
- $this->_property = $property;
- $this->_not = $not;
- }
-
- public function matches($item)
- {
- if ($item === null) {
- return false;
- }
- $property = $this->_property;
- if (is_array($item)) {
- $result = isset($item[$property]);
- } elseif (is_object($item)) {
- $result = isset($item->$property);
- } elseif (is_string($item)) {
- $result = isset($item::$$property);
- } else {
- throw new \InvalidArgumentException('Must pass an object, array, or class name');
- }
-
- return $this->_not ? !$result : $result;
- }
-
- public function describeTo(Description $description)
- {
- $description->appendText($this->_not ? 'unset property ' : 'set property ')->appendText($this->_property);
- }
-
- public function describeMismatch($item, Description $description)
- {
- $value = '';
- if (!$this->_not) {
- $description->appendText('was not set');
- } else {
- $property = $this->_property;
- if (is_array($item)) {
- $value = $item[$property];
- } elseif (is_object($item)) {
- $value = $item->$property;
- } elseif (is_string($item)) {
- $value = $item::$$property;
- }
- parent::describeMismatch($value, $description);
- }
- }
-
- /**
- * Matches if value (class, object, or array) has named $property.
- *
- * @factory
- */
- public static function set($property)
- {
- return new self($property);
- }
-
- /**
- * Matches if value (class, object, or array) does not have named $property.
- *
- * @factory
- */
- public static function notSet($property)
- {
- return new self($property, true);
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/ShortcutCombination.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/ShortcutCombination.php
deleted file mode 100644
index d93db74ff70..00000000000
--- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/ShortcutCombination.php
+++ /dev/null
@@ -1,43 +0,0 @@
-
- */
- private $_matchers;
-
- public function __construct(array $matchers)
- {
- Util::checkAllAreMatchers($matchers);
-
- $this->_matchers = $matchers;
- }
-
- protected function matchesWithShortcut($item, $shortcut)
- {
- /** @var $matcher \Hamcrest\Matcher */
- foreach ($this->_matchers as $matcher) {
- if ($matcher->matches($item) == $shortcut) {
- return $shortcut;
- }
- }
-
- return !$shortcut;
- }
-
- public function describeToWithOperator(Description $description, $operator)
- {
- $description->appendList('(', ' ' . $operator . ' ', ')', $this->_matchers);
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Description.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Description.php
deleted file mode 100644
index 9a482dbfc5a..00000000000
--- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Description.php
+++ /dev/null
@@ -1,70 +0,0 @@
-matchesWithDiagnosticDescription($item, new NullDescription());
- }
-
- public function describeMismatch($item, Description $mismatchDescription)
- {
- $this->matchesWithDiagnosticDescription($item, $mismatchDescription);
- }
-
- abstract protected function matchesWithDiagnosticDescription($item, Description $mismatchDescription);
-}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/FeatureMatcher.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/FeatureMatcher.php
deleted file mode 100644
index 59f6cc73411..00000000000
--- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/FeatureMatcher.php
+++ /dev/null
@@ -1,67 +0,0 @@
-featureValueOf() in a subclass to pull out the feature to be
- * matched against.
- */
-abstract class FeatureMatcher extends TypeSafeDiagnosingMatcher
-{
-
- private $_subMatcher;
- private $_featureDescription;
- private $_featureName;
-
- /**
- * Constructor.
- *
- * @param string $type
- * @param string $subtype
- * @param \Hamcrest\Matcher $subMatcher The matcher to apply to the feature
- * @param string $featureDescription Descriptive text to use in describeTo
- * @param string $featureName Identifying text for mismatch message
- */
- public function __construct($type, $subtype, Matcher $subMatcher, $featureDescription, $featureName)
- {
- parent::__construct($type, $subtype);
-
- $this->_subMatcher = $subMatcher;
- $this->_featureDescription = $featureDescription;
- $this->_featureName = $featureName;
- }
-
- /**
- * Implement this to extract the interesting feature.
- *
- * @param mixed $actual the target object
- *
- * @return mixed the feature to be matched
- */
- abstract protected function featureValueOf($actual);
-
- public function matchesSafelyWithDiagnosticDescription($actual, Description $mismatchDescription)
- {
- $featureValue = $this->featureValueOf($actual);
-
- if (!$this->_subMatcher->matches($featureValue)) {
- $mismatchDescription->appendText($this->_featureName)
- ->appendText(' was ')->appendValue($featureValue);
-
- return false;
- }
-
- return true;
- }
-
- final public function describeTo(Description $description)
- {
- $description->appendText($this->_featureDescription)->appendText(' ')
- ->appendDescriptionOf($this->_subMatcher)
- ;
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Internal/SelfDescribingValue.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Internal/SelfDescribingValue.php
deleted file mode 100644
index 995da71ded8..00000000000
--- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Internal/SelfDescribingValue.php
+++ /dev/null
@@ -1,27 +0,0 @@
-_value = $value;
- }
-
- public function describeTo(Description $description)
- {
- $description->appendValue($this->_value);
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Matcher.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Matcher.php
deleted file mode 100644
index e5dcf093965..00000000000
--- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Matcher.php
+++ /dev/null
@@ -1,50 +0,0 @@
-
- * Matcher implementations should NOT directly implement this interface .
- * Instead, extend the {@link Hamcrest\BaseMatcher} abstract class,
- * which will ensure that the Matcher API can grow to support
- * new features and remain compatible with all Matcher implementations.
- *
- * For easy access to common Matcher implementations, use the static factory
- * methods in {@link Hamcrest\CoreMatchers}.
- *
- * @see Hamcrest\CoreMatchers
- * @see Hamcrest\BaseMatcher
- */
-interface Matcher extends SelfDescribing
-{
-
- /**
- * Evaluates the matcher for argument $item .
- *
- * @param mixed $item the object against which the matcher is evaluated.
- *
- * @return boolean true
if $item matches,
- * otherwise false
.
- *
- * @see Hamcrest\BaseMatcher
- */
- public function matches($item);
-
- /**
- * Generate a description of why the matcher has not accepted the item.
- * The description will be part of a larger description of why a matching
- * failed, so it should be concise.
- * This method assumes that matches($item)
is false, but
- * will not check this.
- *
- * @param mixed $item The item that the Matcher has rejected.
- * @param Description $description
- * @return
- */
- public function describeMismatch($item, Description $description);
-}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/MatcherAssert.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/MatcherAssert.php
deleted file mode 100644
index d546dbee672..00000000000
--- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/MatcherAssert.php
+++ /dev/null
@@ -1,118 +0,0 @@
-
- * // With an identifier
- * assertThat("apple flavour", $apple->flavour(), equalTo("tasty"));
- * // Without an identifier
- * assertThat($apple->flavour(), equalTo("tasty"));
- * // Evaluating a boolean expression
- * assertThat("some error", $a > $b);
- * assertThat($a > $b);
- *
- */
- public static function assertThat(/* $args ... */)
- {
- $args = func_get_args();
- switch (count($args)) {
- case 1:
- self::$_count++;
- if (!$args[0]) {
- throw new AssertionError();
- }
- break;
-
- case 2:
- self::$_count++;
- if ($args[1] instanceof Matcher) {
- self::doAssert('', $args[0], $args[1]);
- } elseif (!$args[1]) {
- throw new AssertionError($args[0]);
- }
- break;
-
- case 3:
- self::$_count++;
- self::doAssert(
- $args[0],
- $args[1],
- Util::wrapValueWithIsEqual($args[2])
- );
- break;
-
- default:
- throw new \InvalidArgumentException('assertThat() requires one to three arguments');
- }
- }
-
- /**
- * Returns the number of assertions performed.
- *
- * @return int
- */
- public static function getCount()
- {
- return self::$_count;
- }
-
- /**
- * Resets the number of assertions performed to zero.
- */
- public static function resetCount()
- {
- self::$_count = 0;
- }
-
- /**
- * Performs the actual assertion logic.
- *
- * If $matcher
doesn't match $actual
,
- * throws a {@link Hamcrest\AssertionError} with a description
- * of the failure along with the optional $identifier
.
- *
- * @param string $identifier added to the message upon failure
- * @param mixed $actual value to compare against $matcher
- * @param \Hamcrest\Matcher $matcher applied to $actual
- * @throws AssertionError
- */
- private static function doAssert($identifier, $actual, Matcher $matcher)
- {
- if (!$matcher->matches($actual)) {
- $description = new StringDescription();
- if (!empty($identifier)) {
- $description->appendText($identifier . PHP_EOL);
- }
- $description->appendText('Expected: ')
- ->appendDescriptionOf($matcher)
- ->appendText(PHP_EOL . ' but: ');
-
- $matcher->describeMismatch($actual, $description);
-
- throw new AssertionError((string) $description);
- }
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Matchers.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Matchers.php
deleted file mode 100644
index 23232e45050..00000000000
--- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Matchers.php
+++ /dev/null
@@ -1,713 +0,0 @@
-
- * assertThat($string, both(containsString("a"))->andAlso(containsString("b")));
- *
- */
- public static function both(\Hamcrest\Matcher $matcher)
- {
- return \Hamcrest\Core\CombinableMatcher::both($matcher);
- }
-
- /**
- * This is useful for fluently combining matchers where either may pass,
- * for example:
- *
- * assertThat($string, either(containsString("a"))->orElse(containsString("b")));
- *
- */
- public static function either(\Hamcrest\Matcher $matcher)
- {
- return \Hamcrest\Core\CombinableMatcher::either($matcher);
- }
-
- /**
- * Wraps an existing matcher and overrides the description when it fails.
- */
- public static function describedAs(/* args... */)
- {
- $args = func_get_args();
- return call_user_func_array(array('\Hamcrest\Core\DescribedAs', 'describedAs'), $args);
- }
-
- /**
- * @param Matcher $itemMatcher
- * A matcher to apply to every element in an array.
- *
- * @return \Hamcrest\Core\Every
- * Evaluates to TRUE for a collection in which every item matches $itemMatcher
- */
- public static function everyItem(\Hamcrest\Matcher $itemMatcher)
- {
- return \Hamcrest\Core\Every::everyItem($itemMatcher);
- }
-
- /**
- * Does array size satisfy a given matcher?
- */
- public static function hasToString($matcher)
- {
- return \Hamcrest\Core\HasToString::hasToString($matcher);
- }
-
- /**
- * Decorates another Matcher, retaining the behavior but allowing tests
- * to be slightly more expressive.
- *
- * For example: assertThat($cheese, equalTo($smelly))
- * vs. assertThat($cheese, is(equalTo($smelly)))
- */
- public static function is($value)
- {
- return \Hamcrest\Core\Is::is($value);
- }
-
- /**
- * This matcher always evaluates to true.
- *
- * @param string $description A meaningful string used when describing itself.
- *
- * @return \Hamcrest\Core\IsAnything
- */
- public static function anything($description = 'ANYTHING')
- {
- return \Hamcrest\Core\IsAnything::anything($description);
- }
-
- /**
- * Test if the value is an array containing this matcher.
- *
- * Example:
- *
- * assertThat(array('a', 'b'), hasItem(equalTo('b')));
- * //Convenience defaults to equalTo()
- * assertThat(array('a', 'b'), hasItem('b'));
- *
- */
- public static function hasItem(/* args... */)
- {
- $args = func_get_args();
- return call_user_func_array(array('\Hamcrest\Core\IsCollectionContaining', 'hasItem'), $args);
- }
-
- /**
- * Test if the value is an array containing elements that match all of these
- * matchers.
- *
- * Example:
- *
- * assertThat(array('a', 'b', 'c'), hasItems(equalTo('a'), equalTo('b')));
- *
- */
- public static function hasItems(/* args... */)
- {
- $args = func_get_args();
- return call_user_func_array(array('\Hamcrest\Core\IsCollectionContaining', 'hasItems'), $args);
- }
-
- /**
- * Is the value equal to another value, as tested by the use of the "=="
- * comparison operator?
- */
- public static function equalTo($item)
- {
- return \Hamcrest\Core\IsEqual::equalTo($item);
- }
-
- /**
- * Tests of the value is identical to $value as tested by the "===" operator.
- */
- public static function identicalTo($value)
- {
- return \Hamcrest\Core\IsIdentical::identicalTo($value);
- }
-
- /**
- * Is the value an instance of a particular type?
- * This version assumes no relationship between the required type and
- * the signature of the method that sets it up, for example in
- * assertThat($anObject, anInstanceOf('Thing'));
- */
- public static function anInstanceOf($theClass)
- {
- return \Hamcrest\Core\IsInstanceOf::anInstanceOf($theClass);
- }
-
- /**
- * Is the value an instance of a particular type?
- * This version assumes no relationship between the required type and
- * the signature of the method that sets it up, for example in
- * assertThat($anObject, anInstanceOf('Thing'));
- */
- public static function any($theClass)
- {
- return \Hamcrest\Core\IsInstanceOf::anInstanceOf($theClass);
- }
-
- /**
- * Matches if value does not match $value.
- */
- public static function not($value)
- {
- return \Hamcrest\Core\IsNot::not($value);
- }
-
- /**
- * Matches if value is null.
- */
- public static function nullValue()
- {
- return \Hamcrest\Core\IsNull::nullValue();
- }
-
- /**
- * Matches if value is not null.
- */
- public static function notNullValue()
- {
- return \Hamcrest\Core\IsNull::notNullValue();
- }
-
- /**
- * Creates a new instance of IsSame.
- *
- * @param mixed $object
- * The predicate evaluates to true only when the argument is
- * this object.
- *
- * @return \Hamcrest\Core\IsSame
- */
- public static function sameInstance($object)
- {
- return \Hamcrest\Core\IsSame::sameInstance($object);
- }
-
- /**
- * Is the value a particular built-in type?
- */
- public static function typeOf($theType)
- {
- return \Hamcrest\Core\IsTypeOf::typeOf($theType);
- }
-
- /**
- * Matches if value (class, object, or array) has named $property.
- */
- public static function set($property)
- {
- return \Hamcrest\Core\Set::set($property);
- }
-
- /**
- * Matches if value (class, object, or array) does not have named $property.
- */
- public static function notSet($property)
- {
- return \Hamcrest\Core\Set::notSet($property);
- }
-
- /**
- * Matches if value is a number equal to $value within some range of
- * acceptable error $delta.
- */
- public static function closeTo($value, $delta)
- {
- return \Hamcrest\Number\IsCloseTo::closeTo($value, $delta);
- }
-
- /**
- * The value is not > $value, nor < $value.
- */
- public static function comparesEqualTo($value)
- {
- return \Hamcrest\Number\OrderingComparison::comparesEqualTo($value);
- }
-
- /**
- * The value is > $value.
- */
- public static function greaterThan($value)
- {
- return \Hamcrest\Number\OrderingComparison::greaterThan($value);
- }
-
- /**
- * The value is >= $value.
- */
- public static function greaterThanOrEqualTo($value)
- {
- return \Hamcrest\Number\OrderingComparison::greaterThanOrEqualTo($value);
- }
-
- /**
- * The value is >= $value.
- */
- public static function atLeast($value)
- {
- return \Hamcrest\Number\OrderingComparison::greaterThanOrEqualTo($value);
- }
-
- /**
- * The value is < $value.
- */
- public static function lessThan($value)
- {
- return \Hamcrest\Number\OrderingComparison::lessThan($value);
- }
-
- /**
- * The value is <= $value.
- */
- public static function lessThanOrEqualTo($value)
- {
- return \Hamcrest\Number\OrderingComparison::lessThanOrEqualTo($value);
- }
-
- /**
- * The value is <= $value.
- */
- public static function atMost($value)
- {
- return \Hamcrest\Number\OrderingComparison::lessThanOrEqualTo($value);
- }
-
- /**
- * Matches if value is a zero-length string.
- */
- public static function isEmptyString()
- {
- return \Hamcrest\Text\IsEmptyString::isEmptyString();
- }
-
- /**
- * Matches if value is a zero-length string.
- */
- public static function emptyString()
- {
- return \Hamcrest\Text\IsEmptyString::isEmptyString();
- }
-
- /**
- * Matches if value is null or a zero-length string.
- */
- public static function isEmptyOrNullString()
- {
- return \Hamcrest\Text\IsEmptyString::isEmptyOrNullString();
- }
-
- /**
- * Matches if value is null or a zero-length string.
- */
- public static function nullOrEmptyString()
- {
- return \Hamcrest\Text\IsEmptyString::isEmptyOrNullString();
- }
-
- /**
- * Matches if value is a non-zero-length string.
- */
- public static function isNonEmptyString()
- {
- return \Hamcrest\Text\IsEmptyString::isNonEmptyString();
- }
-
- /**
- * Matches if value is a non-zero-length string.
- */
- public static function nonEmptyString()
- {
- return \Hamcrest\Text\IsEmptyString::isNonEmptyString();
- }
-
- /**
- * Matches if value is a string equal to $string, regardless of the case.
- */
- public static function equalToIgnoringCase($string)
- {
- return \Hamcrest\Text\IsEqualIgnoringCase::equalToIgnoringCase($string);
- }
-
- /**
- * Matches if value is a string equal to $string, regardless of whitespace.
- */
- public static function equalToIgnoringWhiteSpace($string)
- {
- return \Hamcrest\Text\IsEqualIgnoringWhiteSpace::equalToIgnoringWhiteSpace($string);
- }
-
- /**
- * Matches if value is a string that matches regular expression $pattern.
- */
- public static function matchesPattern($pattern)
- {
- return \Hamcrest\Text\MatchesPattern::matchesPattern($pattern);
- }
-
- /**
- * Matches if value is a string that contains $substring.
- */
- public static function containsString($substring)
- {
- return \Hamcrest\Text\StringContains::containsString($substring);
- }
-
- /**
- * Matches if value is a string that contains $substring regardless of the case.
- */
- public static function containsStringIgnoringCase($substring)
- {
- return \Hamcrest\Text\StringContainsIgnoringCase::containsStringIgnoringCase($substring);
- }
-
- /**
- * Matches if value contains $substrings in a constrained order.
- */
- public static function stringContainsInOrder(/* args... */)
- {
- $args = func_get_args();
- return call_user_func_array(array('\Hamcrest\Text\StringContainsInOrder', 'stringContainsInOrder'), $args);
- }
-
- /**
- * Matches if value is a string that ends with $substring.
- */
- public static function endsWith($substring)
- {
- return \Hamcrest\Text\StringEndsWith::endsWith($substring);
- }
-
- /**
- * Matches if value is a string that starts with $substring.
- */
- public static function startsWith($substring)
- {
- return \Hamcrest\Text\StringStartsWith::startsWith($substring);
- }
-
- /**
- * Is the value an array?
- */
- public static function arrayValue()
- {
- return \Hamcrest\Type\IsArray::arrayValue();
- }
-
- /**
- * Is the value a boolean?
- */
- public static function booleanValue()
- {
- return \Hamcrest\Type\IsBoolean::booleanValue();
- }
-
- /**
- * Is the value a boolean?
- */
- public static function boolValue()
- {
- return \Hamcrest\Type\IsBoolean::booleanValue();
- }
-
- /**
- * Is the value callable?
- */
- public static function callableValue()
- {
- return \Hamcrest\Type\IsCallable::callableValue();
- }
-
- /**
- * Is the value a float/double?
- */
- public static function doubleValue()
- {
- return \Hamcrest\Type\IsDouble::doubleValue();
- }
-
- /**
- * Is the value a float/double?
- */
- public static function floatValue()
- {
- return \Hamcrest\Type\IsDouble::doubleValue();
- }
-
- /**
- * Is the value an integer?
- */
- public static function integerValue()
- {
- return \Hamcrest\Type\IsInteger::integerValue();
- }
-
- /**
- * Is the value an integer?
- */
- public static function intValue()
- {
- return \Hamcrest\Type\IsInteger::integerValue();
- }
-
- /**
- * Is the value a numeric?
- */
- public static function numericValue()
- {
- return \Hamcrest\Type\IsNumeric::numericValue();
- }
-
- /**
- * Is the value an object?
- */
- public static function objectValue()
- {
- return \Hamcrest\Type\IsObject::objectValue();
- }
-
- /**
- * Is the value an object?
- */
- public static function anObject()
- {
- return \Hamcrest\Type\IsObject::objectValue();
- }
-
- /**
- * Is the value a resource?
- */
- public static function resourceValue()
- {
- return \Hamcrest\Type\IsResource::resourceValue();
- }
-
- /**
- * Is the value a scalar (boolean, integer, double, or string)?
- */
- public static function scalarValue()
- {
- return \Hamcrest\Type\IsScalar::scalarValue();
- }
-
- /**
- * Is the value a string?
- */
- public static function stringValue()
- {
- return \Hamcrest\Type\IsString::stringValue();
- }
-
- /**
- * Wraps $matcher
with {@link Hamcrest\Core\IsEqual)
- * if it's not a matcher and the XPath in count()
- * if it's an integer.
- */
- public static function hasXPath($xpath, $matcher = null)
- {
- return \Hamcrest\Xml\HasXPath::hasXPath($xpath, $matcher);
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/NullDescription.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/NullDescription.php
deleted file mode 100644
index aae8e461617..00000000000
--- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/NullDescription.php
+++ /dev/null
@@ -1,43 +0,0 @@
-_value = $value;
- $this->_delta = $delta;
- }
-
- protected function matchesSafely($item)
- {
- return $this->_actualDelta($item) <= 0.0;
- }
-
- protected function describeMismatchSafely($item, Description $mismatchDescription)
- {
- $mismatchDescription->appendValue($item)
- ->appendText(' differed by ')
- ->appendValue($this->_actualDelta($item))
- ;
- }
-
- public function describeTo(Description $description)
- {
- $description->appendText('a numeric value within ')
- ->appendValue($this->_delta)
- ->appendText(' of ')
- ->appendValue($this->_value)
- ;
- }
-
- /**
- * Matches if value is a number equal to $value within some range of
- * acceptable error $delta.
- *
- * @factory
- */
- public static function closeTo($value, $delta)
- {
- return new self($value, $delta);
- }
-
- // -- Private Methods
-
- private function _actualDelta($item)
- {
- return (abs(($item - $this->_value)) - $this->_delta);
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Number/OrderingComparison.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Number/OrderingComparison.php
deleted file mode 100644
index 369d0cfa571..00000000000
--- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Number/OrderingComparison.php
+++ /dev/null
@@ -1,132 +0,0 @@
-_value = $value;
- $this->_minCompare = $minCompare;
- $this->_maxCompare = $maxCompare;
- }
-
- protected function matchesSafely($other)
- {
- $compare = $this->_compare($this->_value, $other);
-
- return ($this->_minCompare <= $compare) && ($compare <= $this->_maxCompare);
- }
-
- protected function describeMismatchSafely($item, Description $mismatchDescription)
- {
- $mismatchDescription
- ->appendValue($item)->appendText(' was ')
- ->appendText($this->_comparison($this->_compare($this->_value, $item)))
- ->appendText(' ')->appendValue($this->_value)
- ;
- }
-
- public function describeTo(Description $description)
- {
- $description->appendText('a value ')
- ->appendText($this->_comparison($this->_minCompare))
- ;
- if ($this->_minCompare != $this->_maxCompare) {
- $description->appendText(' or ')
- ->appendText($this->_comparison($this->_maxCompare))
- ;
- }
- $description->appendText(' ')->appendValue($this->_value);
- }
-
- /**
- * The value is not > $value, nor < $value.
- *
- * @factory
- */
- public static function comparesEqualTo($value)
- {
- return new self($value, 0, 0);
- }
-
- /**
- * The value is > $value.
- *
- * @factory
- */
- public static function greaterThan($value)
- {
- return new self($value, -1, -1);
- }
-
- /**
- * The value is >= $value.
- *
- * @factory atLeast
- */
- public static function greaterThanOrEqualTo($value)
- {
- return new self($value, -1, 0);
- }
-
- /**
- * The value is < $value.
- *
- * @factory
- */
- public static function lessThan($value)
- {
- return new self($value, 1, 1);
- }
-
- /**
- * The value is <= $value.
- *
- * @factory atMost
- */
- public static function lessThanOrEqualTo($value)
- {
- return new self($value, 0, 1);
- }
-
- // -- Private Methods
-
- private function _compare($left, $right)
- {
- $a = $left;
- $b = $right;
-
- if ($a < $b) {
- return -1;
- } elseif ($a == $b) {
- return 0;
- } else {
- return 1;
- }
- }
-
- private function _comparison($compare)
- {
- if ($compare > 0) {
- return 'less than';
- } elseif ($compare == 0) {
- return 'equal to';
- } else {
- return 'greater than';
- }
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/SelfDescribing.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/SelfDescribing.php
deleted file mode 100644
index 872fdf9c506..00000000000
--- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/SelfDescribing.php
+++ /dev/null
@@ -1,23 +0,0 @@
-_out = (string) $out;
- }
-
- public function __toString()
- {
- return $this->_out;
- }
-
- /**
- * Return the description of a {@link Hamcrest\SelfDescribing} object as a
- * String.
- *
- * @param \Hamcrest\SelfDescribing $selfDescribing
- * The object to be described.
- *
- * @return string
- * The description of the object.
- */
- public static function toString(SelfDescribing $selfDescribing)
- {
- $self = new self();
-
- return (string) $self->appendDescriptionOf($selfDescribing);
- }
-
- /**
- * Alias for {@link toString()}.
- */
- public static function asString(SelfDescribing $selfDescribing)
- {
- return self::toString($selfDescribing);
- }
-
- // -- Protected Methods
-
- protected function append($str)
- {
- $this->_out .= $str;
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEmptyString.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEmptyString.php
deleted file mode 100644
index 2ae61b96c8b..00000000000
--- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEmptyString.php
+++ /dev/null
@@ -1,85 +0,0 @@
-_empty = $empty;
- }
-
- public function matches($item)
- {
- return $this->_empty
- ? ($item === '')
- : is_string($item) && $item !== '';
- }
-
- public function describeTo(Description $description)
- {
- $description->appendText($this->_empty ? 'an empty string' : 'a non-empty string');
- }
-
- /**
- * Matches if value is a zero-length string.
- *
- * @factory emptyString
- */
- public static function isEmptyString()
- {
- if (!self::$_INSTANCE) {
- self::$_INSTANCE = new self(true);
- }
-
- return self::$_INSTANCE;
- }
-
- /**
- * Matches if value is null or a zero-length string.
- *
- * @factory nullOrEmptyString
- */
- public static function isEmptyOrNullString()
- {
- if (!self::$_NULL_OR_EMPTY_INSTANCE) {
- self::$_NULL_OR_EMPTY_INSTANCE = AnyOf::anyOf(
- IsNull::nullvalue(),
- self::isEmptyString()
- );
- }
-
- return self::$_NULL_OR_EMPTY_INSTANCE;
- }
-
- /**
- * Matches if value is a non-zero-length string.
- *
- * @factory nonEmptyString
- */
- public static function isNonEmptyString()
- {
- if (!self::$_NOT_INSTANCE) {
- self::$_NOT_INSTANCE = new self(false);
- }
-
- return self::$_NOT_INSTANCE;
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEqualIgnoringCase.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEqualIgnoringCase.php
deleted file mode 100644
index 3836a8c3798..00000000000
--- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEqualIgnoringCase.php
+++ /dev/null
@@ -1,52 +0,0 @@
-_string = $string;
- }
-
- protected function matchesSafely($item)
- {
- return strtolower($this->_string) === strtolower($item);
- }
-
- protected function describeMismatchSafely($item, Description $mismatchDescription)
- {
- $mismatchDescription->appendText('was ')->appendText($item);
- }
-
- public function describeTo(Description $description)
- {
- $description->appendText('equalToIgnoringCase(')
- ->appendValue($this->_string)
- ->appendText(')')
- ;
- }
-
- /**
- * Matches if value is a string equal to $string, regardless of the case.
- *
- * @factory
- */
- public static function equalToIgnoringCase($string)
- {
- return new self($string);
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEqualIgnoringWhiteSpace.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEqualIgnoringWhiteSpace.php
deleted file mode 100644
index 853692b03c4..00000000000
--- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEqualIgnoringWhiteSpace.php
+++ /dev/null
@@ -1,66 +0,0 @@
-_string = $string;
- }
-
- protected function matchesSafely($item)
- {
- return (strtolower($this->_stripSpace($item))
- === strtolower($this->_stripSpace($this->_string)));
- }
-
- protected function describeMismatchSafely($item, Description $mismatchDescription)
- {
- $mismatchDescription->appendText('was ')->appendText($item);
- }
-
- public function describeTo(Description $description)
- {
- $description->appendText('equalToIgnoringWhiteSpace(')
- ->appendValue($this->_string)
- ->appendText(')')
- ;
- }
-
- /**
- * Matches if value is a string equal to $string, regardless of whitespace.
- *
- * @factory
- */
- public static function equalToIgnoringWhiteSpace($string)
- {
- return new self($string);
- }
-
- // -- Private Methods
-
- private function _stripSpace($string)
- {
- $parts = preg_split("/[\r\n\t ]+/", $string);
- foreach ($parts as $i => $part) {
- $parts[$i] = trim($part, " \r\n\t");
- }
-
- return trim(implode(' ', $parts), " \r\n\t");
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/MatchesPattern.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/MatchesPattern.php
deleted file mode 100644
index fa0d68eea36..00000000000
--- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/MatchesPattern.php
+++ /dev/null
@@ -1,40 +0,0 @@
-_substring, (string) $item) >= 1;
- }
-
- protected function relationship()
- {
- return 'matching';
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContains.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContains.php
deleted file mode 100644
index b92786b604b..00000000000
--- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContains.php
+++ /dev/null
@@ -1,45 +0,0 @@
-_substring);
- }
-
- /**
- * Matches if value is a string that contains $substring.
- *
- * @factory
- */
- public static function containsString($substring)
- {
- return new self($substring);
- }
-
- // -- Protected Methods
-
- protected function evalSubstringOf($item)
- {
- return (false !== strpos((string) $item, $this->_substring));
- }
-
- protected function relationship()
- {
- return 'containing';
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContainsIgnoringCase.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContainsIgnoringCase.php
deleted file mode 100644
index 69f37c258ad..00000000000
--- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContainsIgnoringCase.php
+++ /dev/null
@@ -1,40 +0,0 @@
-_substring));
- }
-
- protected function relationship()
- {
- return 'containing in any case';
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContainsInOrder.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContainsInOrder.php
deleted file mode 100644
index e75de65d221..00000000000
--- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContainsInOrder.php
+++ /dev/null
@@ -1,66 +0,0 @@
-_substrings = $substrings;
- }
-
- protected function matchesSafely($item)
- {
- $fromIndex = 0;
-
- foreach ($this->_substrings as $substring) {
- if (false === $fromIndex = strpos($item, $substring, $fromIndex)) {
- return false;
- }
- }
-
- return true;
- }
-
- protected function describeMismatchSafely($item, Description $mismatchDescription)
- {
- $mismatchDescription->appendText('was ')->appendText($item);
- }
-
- public function describeTo(Description $description)
- {
- $description->appendText('a string containing ')
- ->appendValueList('', ', ', '', $this->_substrings)
- ->appendText(' in order')
- ;
- }
-
- /**
- * Matches if value contains $substrings in a constrained order.
- *
- * @factory ...
- */
- public static function stringContainsInOrder(/* args... */)
- {
- $args = func_get_args();
-
- if (isset($args[0]) && is_array($args[0])) {
- $args = $args[0];
- }
-
- return new self($args);
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringEndsWith.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringEndsWith.php
deleted file mode 100644
index f802ee4d1a5..00000000000
--- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringEndsWith.php
+++ /dev/null
@@ -1,40 +0,0 @@
-_substring))) === $this->_substring);
- }
-
- protected function relationship()
- {
- return 'ending with';
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringStartsWith.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringStartsWith.php
deleted file mode 100644
index 79c95656abd..00000000000
--- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringStartsWith.php
+++ /dev/null
@@ -1,40 +0,0 @@
-_substring)) === $this->_substring);
- }
-
- protected function relationship()
- {
- return 'starting with';
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/SubstringMatcher.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/SubstringMatcher.php
deleted file mode 100644
index e560ad62700..00000000000
--- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/SubstringMatcher.php
+++ /dev/null
@@ -1,45 +0,0 @@
-_substring = $substring;
- }
-
- protected function matchesSafely($item)
- {
- return $this->evalSubstringOf($item);
- }
-
- protected function describeMismatchSafely($item, Description $mismatchDescription)
- {
- $mismatchDescription->appendText('was "')->appendText($item)->appendText('"');
- }
-
- public function describeTo(Description $description)
- {
- $description->appendText('a string ')
- ->appendText($this->relationship())
- ->appendText(' ')
- ->appendValue($this->_substring)
- ;
- }
-
- abstract protected function evalSubstringOf($string);
-
- abstract protected function relationship();
-}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsArray.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsArray.php
deleted file mode 100644
index 9179102ff56..00000000000
--- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsArray.php
+++ /dev/null
@@ -1,32 +0,0 @@
-matchesSafelyWithDiagnosticDescription($item, new NullDescription());
- }
-
- final public function describeMismatchSafely($item, Description $mismatchDescription)
- {
- $this->matchesSafelyWithDiagnosticDescription($item, $mismatchDescription);
- }
-
- // -- Protected Methods
-
- /**
- * Subclasses should implement these. The item will already have been checked for
- * the specific type.
- */
- abstract protected function matchesSafelyWithDiagnosticDescription($item, Description $mismatchDescription);
-}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/TypeSafeMatcher.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/TypeSafeMatcher.php
deleted file mode 100644
index 56e299a9ab7..00000000000
--- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/TypeSafeMatcher.php
+++ /dev/null
@@ -1,107 +0,0 @@
-_expectedType = $expectedType;
- $this->_expectedSubtype = $expectedSubtype;
- }
-
- final public function matches($item)
- {
- return $this->_isSafeType($item) && $this->matchesSafely($item);
- }
-
- final public function describeMismatch($item, Description $mismatchDescription)
- {
- if (!$this->_isSafeType($item)) {
- parent::describeMismatch($item, $mismatchDescription);
- } else {
- $this->describeMismatchSafely($item, $mismatchDescription);
- }
- }
-
- // -- Protected Methods
-
- /**
- * The item will already have been checked for the specific type and subtype.
- */
- abstract protected function matchesSafely($item);
-
- /**
- * The item will already have been checked for the specific type and subtype.
- */
- abstract protected function describeMismatchSafely($item, Description $mismatchDescription);
-
- // -- Private Methods
-
- private function _isSafeType($value)
- {
- switch ($this->_expectedType) {
-
- case self::TYPE_ANY:
- return true;
-
- case self::TYPE_STRING:
- return is_string($value) || is_numeric($value);
-
- case self::TYPE_NUMERIC:
- return is_numeric($value) || is_string($value);
-
- case self::TYPE_ARRAY:
- return is_array($value);
-
- case self::TYPE_OBJECT:
- return is_object($value)
- && ($this->_expectedSubtype === null
- || $value instanceof $this->_expectedSubtype);
-
- case self::TYPE_RESOURCE:
- return is_resource($value)
- && ($this->_expectedSubtype === null
- || get_resource_type($value) == $this->_expectedSubtype);
-
- case self::TYPE_BOOLEAN:
- return true;
-
- default:
- return true;
-
- }
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Util.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Util.php
deleted file mode 100644
index 50f92017625..00000000000
--- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Util.php
+++ /dev/null
@@ -1,72 +0,0 @@
- all items are
- */
- public static function createMatcherArray(array $items)
- {
- //Extract single array item
- if (count($items) == 1 && is_array($items[0])) {
- $items = $items[0];
- }
-
- //Replace non-matchers
- foreach ($items as &$item) {
- if (!($item instanceof Matcher)) {
- $item = Core\IsEqual::equalTo($item);
- }
- }
-
- return $items;
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Xml/HasXPath.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Xml/HasXPath.php
deleted file mode 100644
index d9764e45f4a..00000000000
--- a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Xml/HasXPath.php
+++ /dev/null
@@ -1,195 +0,0 @@
-_xpath = $xpath;
- $this->_matcher = $matcher;
- }
-
- /**
- * Matches if the XPath matches against the DOM node and the matcher.
- *
- * @param string|\DOMNode $actual
- * @param Description $mismatchDescription
- * @return bool
- */
- protected function matchesWithDiagnosticDescription($actual, Description $mismatchDescription)
- {
- if (is_string($actual)) {
- $actual = $this->createDocument($actual);
- } elseif (!$actual instanceof \DOMNode) {
- $mismatchDescription->appendText('was ')->appendValue($actual);
-
- return false;
- }
- $result = $this->evaluate($actual);
- if ($result instanceof \DOMNodeList) {
- return $this->matchesContent($result, $mismatchDescription);
- } else {
- return $this->matchesExpression($result, $mismatchDescription);
- }
- }
-
- /**
- * Creates and returns a DOMDocument
from the given
- * XML or HTML string.
- *
- * @param string $text
- * @return \DOMDocument built from $text
- * @throws \InvalidArgumentException if the document is not valid
- */
- protected function createDocument($text)
- {
- $document = new \DOMDocument();
- if (preg_match('/^\s*<\?xml/', $text)) {
- if (!@$document->loadXML($text)) {
- throw new \InvalidArgumentException('Must pass a valid XML document');
- }
- } else {
- if (!@$document->loadHTML($text)) {
- throw new \InvalidArgumentException('Must pass a valid HTML or XHTML document');
- }
- }
-
- return $document;
- }
-
- /**
- * Applies the configured XPath to the DOM node and returns either
- * the result if it's an expression or the node list if it's a query.
- *
- * @param \DOMNode $node context from which to issue query
- * @return mixed result of expression or DOMNodeList from query
- */
- protected function evaluate(\DOMNode $node)
- {
- if ($node instanceof \DOMDocument) {
- $xpathDocument = new \DOMXPath($node);
-
- return $xpathDocument->evaluate($this->_xpath);
- } else {
- $xpathDocument = new \DOMXPath($node->ownerDocument);
-
- return $xpathDocument->evaluate($this->_xpath, $node);
- }
- }
-
- /**
- * Matches if the list of nodes is not empty and the content of at least
- * one node matches the configured matcher, if supplied.
- *
- * @param \DOMNodeList $nodes selected by the XPath query
- * @param Description $mismatchDescription
- * @return bool
- */
- protected function matchesContent(\DOMNodeList $nodes, Description $mismatchDescription)
- {
- if ($nodes->length == 0) {
- $mismatchDescription->appendText('XPath returned no results');
- } elseif ($this->_matcher === null) {
- return true;
- } else {
- foreach ($nodes as $node) {
- if ($this->_matcher->matches($node->textContent)) {
- return true;
- }
- }
- $content = array();
- foreach ($nodes as $node) {
- $content[] = $node->textContent;
- }
- $mismatchDescription->appendText('XPath returned ')
- ->appendValue($content);
- }
-
- return false;
- }
-
- /**
- * Matches if the result of the XPath expression matches the configured
- * matcher or evaluates to true
if there is none.
- *
- * @param mixed $result result of the XPath expression
- * @param Description $mismatchDescription
- * @return bool
- */
- protected function matchesExpression($result, Description $mismatchDescription)
- {
- if ($this->_matcher === null) {
- if ($result) {
- return true;
- }
- $mismatchDescription->appendText('XPath expression result was ')
- ->appendValue($result);
- } else {
- if ($this->_matcher->matches($result)) {
- return true;
- }
- $mismatchDescription->appendText('XPath expression result ');
- $this->_matcher->describeMismatch($result, $mismatchDescription);
- }
-
- return false;
- }
-
- public function describeTo(Description $description)
- {
- $description->appendText('XML or HTML document with XPath "')
- ->appendText($this->_xpath)
- ->appendText('"');
- if ($this->_matcher !== null) {
- $description->appendText(' ');
- $this->_matcher->describeTo($description);
- }
- }
-
- /**
- * Wraps $matcher
with {@link Hamcrest\Core\IsEqual)
- * if it's not a matcher and the XPath in count()
- * if it's an integer.
- *
- * @factory
- */
- public static function hasXPath($xpath, $matcher = null)
- {
- if ($matcher === null || $matcher instanceof Matcher) {
- return new self($xpath, $matcher);
- } elseif (is_int($matcher) && strpos($xpath, 'count(') !== 0) {
- $xpath = 'count(' . $xpath . ')';
- }
-
- return new self($xpath, IsEqual::equalTo($matcher));
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/AbstractMatcherTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/AbstractMatcherTest.php
deleted file mode 100644
index 6c52c0e5d33..00000000000
--- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/AbstractMatcherTest.php
+++ /dev/null
@@ -1,66 +0,0 @@
-assertTrue($matcher->matches($arg), $message);
- }
-
- public function assertDoesNotMatch(\Hamcrest\Matcher $matcher, $arg, $message)
- {
- $this->assertFalse($matcher->matches($arg), $message);
- }
-
- public function assertDescription($expected, \Hamcrest\Matcher $matcher)
- {
- $description = new \Hamcrest\StringDescription();
- $description->appendDescriptionOf($matcher);
- $this->assertEquals($expected, (string) $description, 'Expected description');
- }
-
- public function assertMismatchDescription($expected, \Hamcrest\Matcher $matcher, $arg)
- {
- $description = new \Hamcrest\StringDescription();
- $this->assertFalse(
- $matcher->matches($arg),
- 'Precondtion: Matcher should not match item'
- );
- $matcher->describeMismatch($arg, $description);
- $this->assertEquals(
- $expected,
- (string) $description,
- 'Expected mismatch description'
- );
- }
-
- public function testIsNullSafe()
- {
- //Should not generate any notices
- $this->createMatcher()->matches(null);
- $this->createMatcher()->describeMismatch(
- null,
- new \Hamcrest\NullDescription()
- );
- }
-
- public function testCopesWithUnknownTypes()
- {
- //Should not generate any notices
- $this->createMatcher()->matches(new UnknownType());
- $this->createMatcher()->describeMismatch(
- new UnknownType(),
- new NullDescription()
- );
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayContainingInAnyOrderTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayContainingInAnyOrderTest.php
deleted file mode 100644
index 45d9f138ae3..00000000000
--- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayContainingInAnyOrderTest.php
+++ /dev/null
@@ -1,54 +0,0 @@
-assertDescription('[<1>, <2>] in any order', containsInAnyOrder(array(1, 2)));
- }
-
- public function testMatchesItemsInAnyOrder()
- {
- $this->assertMatches(containsInAnyOrder(array(1, 2, 3)), array(1, 2, 3), 'in order');
- $this->assertMatches(containsInAnyOrder(array(1, 2, 3)), array(3, 2, 1), 'out of order');
- $this->assertMatches(containsInAnyOrder(array(1)), array(1), 'single');
- }
-
- public function testAppliesMatchersInAnyOrder()
- {
- $this->assertMatches(
- containsInAnyOrder(array(1, 2, 3)),
- array(1, 2, 3),
- 'in order'
- );
- $this->assertMatches(
- containsInAnyOrder(array(1, 2, 3)),
- array(3, 2, 1),
- 'out of order'
- );
- $this->assertMatches(
- containsInAnyOrder(array(1)),
- array(1),
- 'single'
- );
- }
-
- public function testMismatchesItemsInAnyOrder()
- {
- $matcher = containsInAnyOrder(array(1, 2, 3));
-
- $this->assertMismatchDescription('was null', $matcher, null);
- $this->assertMismatchDescription('No item matches: <1>, <2>, <3> in []', $matcher, array());
- $this->assertMismatchDescription('No item matches: <2>, <3> in [<1>]', $matcher, array(1));
- $this->assertMismatchDescription('Not matched: <4>', $matcher, array(4, 3, 2, 1));
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayContainingInOrderTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayContainingInOrderTest.php
deleted file mode 100644
index 1868343fa42..00000000000
--- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayContainingInOrderTest.php
+++ /dev/null
@@ -1,44 +0,0 @@
-assertDescription('[<1>, <2>]', arrayContaining(array(1, 2)));
- }
-
- public function testMatchesItemsInOrder()
- {
- $this->assertMatches(arrayContaining(array(1, 2, 3)), array(1, 2, 3), 'in order');
- $this->assertMatches(arrayContaining(array(1)), array(1), 'single');
- }
-
- public function testAppliesMatchersInOrder()
- {
- $this->assertMatches(
- arrayContaining(array(1, 2, 3)),
- array(1, 2, 3),
- 'in order'
- );
- $this->assertMatches(arrayContaining(array(1)), array(1), 'single');
- }
-
- public function testMismatchesItemsInAnyOrder()
- {
- $matcher = arrayContaining(array(1, 2, 3));
- $this->assertMismatchDescription('was null', $matcher, null);
- $this->assertMismatchDescription('No item matched: <1>', $matcher, array());
- $this->assertMismatchDescription('No item matched: <2>', $matcher, array(1));
- $this->assertMismatchDescription('item with key 0: was <4>', $matcher, array(4, 3, 2, 1));
- $this->assertMismatchDescription('item with key 2: was <4>', $matcher, array(1, 2, 4));
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayContainingKeyTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayContainingKeyTest.php
deleted file mode 100644
index 31770d8dd51..00000000000
--- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayContainingKeyTest.php
+++ /dev/null
@@ -1,62 +0,0 @@
-1);
-
- $this->assertMatches(hasKey('a'), $array, 'Matches single key');
- }
-
- public function testMatchesArrayContainingKey()
- {
- $array = array('a'=>1, 'b'=>2, 'c'=>3);
-
- $this->assertMatches(hasKey('a'), $array, 'Matches a');
- $this->assertMatches(hasKey('c'), $array, 'Matches c');
- }
-
- public function testMatchesArrayContainingKeyWithIntegerKeys()
- {
- $array = array(1=>'A', 2=>'B');
-
- assertThat($array, hasKey(1));
- }
-
- public function testMatchesArrayContainingKeyWithNumberKeys()
- {
- $array = array(1=>'A', 2=>'B');
-
- assertThat($array, hasKey(1));
-
- // very ugly version!
- assertThat($array, IsArrayContainingKey::hasKeyInArray(2));
- }
-
- public function testHasReadableDescription()
- {
- $this->assertDescription('array with key "a"', hasKey('a'));
- }
-
- public function testDoesNotMatchEmptyArray()
- {
- $this->assertMismatchDescription('array was []', hasKey('Foo'), array());
- }
-
- public function testDoesNotMatchArrayMissingKey()
- {
- $array = array('a'=>1, 'b'=>2, 'c'=>3);
-
- $this->assertMismatchDescription('array was ["a" => <1>, "b" => <2>, "c" => <3>]', hasKey('d'), $array);
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayContainingKeyValuePairTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayContainingKeyValuePairTest.php
deleted file mode 100644
index a415f9f7a84..00000000000
--- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayContainingKeyValuePairTest.php
+++ /dev/null
@@ -1,36 +0,0 @@
-1, 'b'=>2);
-
- $this->assertMatches(hasKeyValuePair(equalTo('a'), equalTo(1)), $array, 'matcherA');
- $this->assertMatches(hasKeyValuePair(equalTo('b'), equalTo(2)), $array, 'matcherB');
- $this->assertMismatchDescription(
- 'array was ["a" => <1>, "b" => <2>]',
- hasKeyValuePair(equalTo('c'), equalTo(3)),
- $array
- );
- }
-
- public function testDoesNotMatchNull()
- {
- $this->assertMismatchDescription('was null', hasKeyValuePair(anything(), anything()), null);
- }
-
- public function testHasReadableDescription()
- {
- $this->assertDescription('array containing ["a" => <2>]', hasKeyValuePair(equalTo('a'), equalTo(2)));
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayContainingTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayContainingTest.php
deleted file mode 100644
index 8d5bd810925..00000000000
--- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayContainingTest.php
+++ /dev/null
@@ -1,50 +0,0 @@
-assertMatches(
- hasItemInArray('a'),
- array('a', 'b', 'c'),
- "should matches array that contains 'a'"
- );
- }
-
- public function testDoesNotMatchAnArrayThatDoesntContainAnElementMatchingTheGivenMatcher()
- {
- $this->assertDoesNotMatch(
- hasItemInArray('a'),
- array('b', 'c'),
- "should not matches array that doesn't contain 'a'"
- );
- $this->assertDoesNotMatch(
- hasItemInArray('a'),
- array(),
- 'should not match empty array'
- );
- }
-
- public function testDoesNotMatchNull()
- {
- $this->assertDoesNotMatch(
- hasItemInArray('a'),
- null,
- 'should not match null'
- );
- }
-
- public function testHasAReadableDescription()
- {
- $this->assertDescription('an array containing "a"', hasItemInArray('a'));
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayTest.php
deleted file mode 100644
index e4db53e7963..00000000000
--- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayTest.php
+++ /dev/null
@@ -1,89 +0,0 @@
-assertMatches(
- anArray(array(equalTo('a'), equalTo('b'), equalTo('c'))),
- array('a', 'b', 'c'),
- 'should match array with matching elements'
- );
- }
-
- public function testDoesNotMatchAnArrayWhenElementsDoNotMatch()
- {
- $this->assertDoesNotMatch(
- anArray(array(equalTo('a'), equalTo('b'))),
- array('b', 'c'),
- 'should not match array with different elements'
- );
- }
-
- public function testDoesNotMatchAnArrayOfDifferentSize()
- {
- $this->assertDoesNotMatch(
- anArray(array(equalTo('a'), equalTo('b'))),
- array('a', 'b', 'c'),
- 'should not match larger array'
- );
- $this->assertDoesNotMatch(
- anArray(array(equalTo('a'), equalTo('b'))),
- array('a'),
- 'should not match smaller array'
- );
- }
-
- public function testDoesNotMatchNull()
- {
- $this->assertDoesNotMatch(
- anArray(array(equalTo('a'))),
- null,
- 'should not match null'
- );
- }
-
- public function testHasAReadableDescription()
- {
- $this->assertDescription(
- '["a", "b"]',
- anArray(array(equalTo('a'), equalTo('b')))
- );
- }
-
- public function testHasAReadableMismatchDescriptionWhenKeysDontMatch()
- {
- $this->assertMismatchDescription(
- 'array keys were [<1>, <2>]',
- anArray(array(equalTo('a'), equalTo('b'))),
- array(1 => 'a', 2 => 'b')
- );
- }
-
- public function testSupportsMatchesAssociativeArrays()
- {
- $this->assertMatches(
- anArray(array('x'=>equalTo('a'), 'y'=>equalTo('b'), 'z'=>equalTo('c'))),
- array('x'=>'a', 'y'=>'b', 'z'=>'c'),
- 'should match associative array with matching elements'
- );
- }
-
- public function testDoesNotMatchAnAssociativeArrayWhenKeysDoNotMatch()
- {
- $this->assertDoesNotMatch(
- anArray(array('x'=>equalTo('a'), 'y'=>equalTo('b'))),
- array('x'=>'b', 'z'=>'c'),
- 'should not match array with different keys'
- );
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayWithSizeTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayWithSizeTest.php
deleted file mode 100644
index 8413c896d9e..00000000000
--- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Array/IsArrayWithSizeTest.php
+++ /dev/null
@@ -1,37 +0,0 @@
-assertMatches(arrayWithSize(equalTo(3)), array(1, 2, 3), 'correct size');
- $this->assertDoesNotMatch(arrayWithSize(equalTo(2)), array(1, 2, 3), 'incorrect size');
- }
-
- public function testProvidesConvenientShortcutForArrayWithSizeEqualTo()
- {
- $this->assertMatches(arrayWithSize(3), array(1, 2, 3), 'correct size');
- $this->assertDoesNotMatch(arrayWithSize(2), array(1, 2, 3), 'incorrect size');
- }
-
- public function testEmptyArray()
- {
- $this->assertMatches(emptyArray(), array(), 'correct size');
- $this->assertDoesNotMatch(emptyArray(), array(1), 'incorrect size');
- }
-
- public function testHasAReadableDescription()
- {
- $this->assertDescription('an array with size <3>', arrayWithSize(equalTo(3)));
- $this->assertDescription('an empty array', emptyArray());
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/BaseMatcherTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/BaseMatcherTest.php
deleted file mode 100644
index 833e2c3ec06..00000000000
--- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/BaseMatcherTest.php
+++ /dev/null
@@ -1,23 +0,0 @@
-appendText('SOME DESCRIPTION');
- }
-
- public function testDescribesItselfWithToStringMethod()
- {
- $someMatcher = new \Hamcrest\SomeMatcher();
- $this->assertEquals('SOME DESCRIPTION', (string) $someMatcher);
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Collection/IsEmptyTraversableTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Collection/IsEmptyTraversableTest.php
deleted file mode 100644
index 2f15fb49948..00000000000
--- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Collection/IsEmptyTraversableTest.php
+++ /dev/null
@@ -1,77 +0,0 @@
-assertMatches(
- emptyTraversable(),
- new \ArrayObject(array()),
- 'an empty traversable'
- );
- }
-
- public function testEmptyMatcherDoesNotMatchWhenNotEmpty()
- {
- $this->assertDoesNotMatch(
- emptyTraversable(),
- new \ArrayObject(array(1, 2, 3)),
- 'a non-empty traversable'
- );
- }
-
- public function testEmptyMatcherDoesNotMatchNull()
- {
- $this->assertDoesNotMatch(
- emptyTraversable(),
- null,
- 'should not match null'
- );
- }
-
- public function testEmptyMatcherHasAReadableDescription()
- {
- $this->assertDescription('an empty traversable', emptyTraversable());
- }
-
- public function testNonEmptyDoesNotMatchNull()
- {
- $this->assertDoesNotMatch(
- nonEmptyTraversable(),
- null,
- 'should not match null'
- );
- }
-
- public function testNonEmptyDoesNotMatchWhenEmpty()
- {
- $this->assertDoesNotMatch(
- nonEmptyTraversable(),
- new \ArrayObject(array()),
- 'an empty traversable'
- );
- }
-
- public function testNonEmptyMatchesWhenNotEmpty()
- {
- $this->assertMatches(
- nonEmptyTraversable(),
- new \ArrayObject(array(1, 2, 3)),
- 'a non-empty traversable'
- );
- }
-
- public function testNonEmptyNonEmptyMatcherHasAReadableDescription()
- {
- $this->assertDescription('a non-empty traversable', nonEmptyTraversable());
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Collection/IsTraversableWithSizeTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Collection/IsTraversableWithSizeTest.php
deleted file mode 100644
index c1c67a7a4e8..00000000000
--- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Collection/IsTraversableWithSizeTest.php
+++ /dev/null
@@ -1,57 +0,0 @@
-assertMatches(
- traversableWithSize(equalTo(3)),
- new \ArrayObject(array(1, 2, 3)),
- 'correct size'
- );
- }
-
- public function testDoesNotMatchWhenSizeIsIncorrect()
- {
- $this->assertDoesNotMatch(
- traversableWithSize(equalTo(2)),
- new \ArrayObject(array(1, 2, 3)),
- 'incorrect size'
- );
- }
-
- public function testDoesNotMatchNull()
- {
- $this->assertDoesNotMatch(
- traversableWithSize(3),
- null,
- 'should not match null'
- );
- }
-
- public function testProvidesConvenientShortcutForTraversableWithSizeEqualTo()
- {
- $this->assertMatches(
- traversableWithSize(3),
- new \ArrayObject(array(1, 2, 3)),
- 'correct size'
- );
- }
-
- public function testHasAReadableDescription()
- {
- $this->assertDescription(
- 'a traversable with size <3>',
- traversableWithSize(equalTo(3))
- );
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/AllOfTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/AllOfTest.php
deleted file mode 100644
index 86b8c277f69..00000000000
--- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/AllOfTest.php
+++ /dev/null
@@ -1,56 +0,0 @@
-assertDescription(
- '("good" and "bad" and "ugly")',
- allOf('good', 'bad', 'ugly')
- );
- }
-
- public function testMismatchDescriptionDescribesFirstFailingMatch()
- {
- $this->assertMismatchDescription(
- '"good" was "bad"',
- allOf('bad', 'good'),
- 'bad'
- );
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/AnyOfTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/AnyOfTest.php
deleted file mode 100644
index 3d62b9350e5..00000000000
--- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/AnyOfTest.php
+++ /dev/null
@@ -1,79 +0,0 @@
-assertDescription(
- '("good" or "bad" or "ugly")',
- anyOf('good', 'bad', 'ugly')
- );
- }
-
- public function testNoneOfEvaluatesToTheLogicalDisjunctionOfTwoOtherMatchers()
- {
- assertThat('good', not(noneOf('bad', 'good')));
- assertThat('good', not(noneOf('good', 'good')));
- assertThat('good', not(noneOf('good', 'bad')));
-
- assertThat('good', noneOf('bad', startsWith('b')));
- }
-
- public function testNoneOfEvaluatesToTheLogicalDisjunctionOfManyOtherMatchers()
- {
- assertThat('good', not(noneOf('bad', 'good', 'bad', 'bad', 'bad')));
- assertThat('good', noneOf('bad', 'bad', 'bad', 'bad', 'bad'));
- }
-
- public function testNoneOfSupportsMixedTypes()
- {
- $combined = noneOf(
- equalTo(new \Hamcrest\Core\SampleBaseClass('good')),
- equalTo(new \Hamcrest\Core\SampleBaseClass('ugly')),
- equalTo(new \Hamcrest\Core\SampleSubClass('good'))
- );
-
- assertThat(new \Hamcrest\Core\SampleSubClass('bad'), $combined);
- }
-
- public function testNoneOfHasAReadableDescription()
- {
- $this->assertDescription(
- 'not ("good" or "bad" or "ugly")',
- noneOf('good', 'bad', 'ugly')
- );
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/CombinableMatcherTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/CombinableMatcherTest.php
deleted file mode 100644
index 4c226149932..00000000000
--- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/CombinableMatcherTest.php
+++ /dev/null
@@ -1,59 +0,0 @@
-_either_3_or_4 = \Hamcrest\Core\CombinableMatcher::either(equalTo(3))->orElse(equalTo(4));
- $this->_not_3_and_not_4 = \Hamcrest\Core\CombinableMatcher::both(not(equalTo(3)))->andAlso(not(equalTo(4)));
- }
-
- protected function createMatcher()
- {
- return \Hamcrest\Core\CombinableMatcher::either(equalTo('irrelevant'))->orElse(equalTo('ignored'));
- }
-
- public function testBothAcceptsAndRejects()
- {
- assertThat(2, $this->_not_3_and_not_4);
- assertThat(3, not($this->_not_3_and_not_4));
- }
-
- public function testAcceptsAndRejectsThreeAnds()
- {
- $tripleAnd = $this->_not_3_and_not_4->andAlso(equalTo(2));
- assertThat(2, $tripleAnd);
- assertThat(3, not($tripleAnd));
- }
-
- public function testBothDescribesItself()
- {
- $this->assertEquals('(not <3> and not <4>)', (string) $this->_not_3_and_not_4);
- $this->assertMismatchDescription('was <3>', $this->_not_3_and_not_4, 3);
- }
-
- public function testEitherAcceptsAndRejects()
- {
- assertThat(3, $this->_either_3_or_4);
- assertThat(6, not($this->_either_3_or_4));
- }
-
- public function testAcceptsAndRejectsThreeOrs()
- {
- $orTriple = $this->_either_3_or_4->orElse(greaterThan(10));
-
- assertThat(11, $orTriple);
- assertThat(9, not($orTriple));
- }
-
- public function testEitherDescribesItself()
- {
- $this->assertEquals('(<3> or <4>)', (string) $this->_either_3_or_4);
- $this->assertMismatchDescription('was <6>', $this->_either_3_or_4, 6);
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/DescribedAsTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/DescribedAsTest.php
deleted file mode 100644
index 673ab41e16f..00000000000
--- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/DescribedAsTest.php
+++ /dev/null
@@ -1,36 +0,0 @@
-assertDescription('m1 description', $m1);
- $this->assertDescription('m2 description', $m2);
- }
-
- public function testAppendsValuesToDescription()
- {
- $m = describedAs('value 1 = %0, value 2 = %1', anything(), 33, 97);
-
- $this->assertDescription('value 1 = <33>, value 2 = <97>', $m);
- }
-
- public function testDelegatesMatchingToAnotherMatcher()
- {
- $m1 = describedAs('irrelevant', anything());
- $m2 = describedAs('irrelevant', not(anything()));
-
- $this->assertTrue($m1->matches(new \stdClass()));
- $this->assertFalse($m2->matches('hi'));
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/EveryTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/EveryTest.php
deleted file mode 100644
index 5eb153c5ee9..00000000000
--- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/EveryTest.php
+++ /dev/null
@@ -1,30 +0,0 @@
-assertEquals('every item is a string containing "a"', (string) $each);
-
- $this->assertMismatchDescription('an item was "BbB"', $each, array('BbB'));
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/HasToStringTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/HasToStringTest.php
deleted file mode 100644
index e2e136dcd36..00000000000
--- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/HasToStringTest.php
+++ /dev/null
@@ -1,108 +0,0 @@
-assertMatches(
- hasToString(equalTo('php')),
- new \Hamcrest\Core\PhpForm(),
- 'correct __toString'
- );
- $this->assertMatches(
- hasToString(equalTo('java')),
- new \Hamcrest\Core\JavaForm(),
- 'correct toString'
- );
- }
-
- public function testPicksJavaOverPhpToString()
- {
- $this->assertMatches(
- hasToString(equalTo('java')),
- new \Hamcrest\Core\BothForms(),
- 'correct toString'
- );
- }
-
- public function testDoesNotMatchWhenToStringDoesNotMatch()
- {
- $this->assertDoesNotMatch(
- hasToString(equalTo('mismatch')),
- new \Hamcrest\Core\PhpForm(),
- 'incorrect __toString'
- );
- $this->assertDoesNotMatch(
- hasToString(equalTo('mismatch')),
- new \Hamcrest\Core\JavaForm(),
- 'incorrect toString'
- );
- $this->assertDoesNotMatch(
- hasToString(equalTo('mismatch')),
- new \Hamcrest\Core\BothForms(),
- 'incorrect __toString'
- );
- }
-
- public function testDoesNotMatchNull()
- {
- $this->assertDoesNotMatch(
- hasToString(equalTo('a')),
- null,
- 'should not match null'
- );
- }
-
- public function testProvidesConvenientShortcutForTraversableWithSizeEqualTo()
- {
- $this->assertMatches(
- hasToString(equalTo('php')),
- new \Hamcrest\Core\PhpForm(),
- 'correct __toString'
- );
- }
-
- public function testHasAReadableDescription()
- {
- $this->assertDescription(
- 'an object with toString() "php"',
- hasToString(equalTo('php'))
- );
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsAnythingTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsAnythingTest.php
deleted file mode 100644
index f68032e53e2..00000000000
--- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsAnythingTest.php
+++ /dev/null
@@ -1,29 +0,0 @@
-assertDescription('ANYTHING', anything());
- }
-
- public function testCanOverrideDescription()
- {
- $description = 'description';
- $this->assertDescription($description, anything($description));
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsCollectionContainingTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsCollectionContainingTest.php
deleted file mode 100644
index a3929b543ae..00000000000
--- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsCollectionContainingTest.php
+++ /dev/null
@@ -1,91 +0,0 @@
-assertMatches(
- $itemMatcher,
- array('a', 'b', 'c'),
- "should match list that contains 'a'"
- );
- }
-
- public function testDoesNotMatchCollectionThatDoesntContainAnElementMatchingTheGivenMatcher()
- {
- $matcher1 = hasItem(equalTo('a'));
- $this->assertDoesNotMatch(
- $matcher1,
- array('b', 'c'),
- "should not match list that doesn't contain 'a'"
- );
-
- $matcher2 = hasItem(equalTo('a'));
- $this->assertDoesNotMatch(
- $matcher2,
- array(),
- 'should not match the empty list'
- );
- }
-
- public function testDoesNotMatchNull()
- {
- $this->assertDoesNotMatch(
- hasItem(equalTo('a')),
- null,
- 'should not match null'
- );
- }
-
- public function testHasAReadableDescription()
- {
- $this->assertDescription('a collection containing "a"', hasItem(equalTo('a')));
- }
-
- public function testMatchesAllItemsInCollection()
- {
- $matcher1 = hasItems(equalTo('a'), equalTo('b'), equalTo('c'));
- $this->assertMatches(
- $matcher1,
- array('a', 'b', 'c'),
- 'should match list containing all items'
- );
-
- $matcher2 = hasItems('a', 'b', 'c');
- $this->assertMatches(
- $matcher2,
- array('a', 'b', 'c'),
- 'should match list containing all items (without matchers)'
- );
-
- $matcher3 = hasItems(equalTo('a'), equalTo('b'), equalTo('c'));
- $this->assertMatches(
- $matcher3,
- array('c', 'b', 'a'),
- 'should match list containing all items in any order'
- );
-
- $matcher4 = hasItems(equalTo('a'), equalTo('b'), equalTo('c'));
- $this->assertMatches(
- $matcher4,
- array('e', 'c', 'b', 'a', 'd'),
- 'should match list containing all items plus others'
- );
-
- $matcher5 = hasItems(equalTo('a'), equalTo('b'), equalTo('c'));
- $this->assertDoesNotMatch(
- $matcher5,
- array('e', 'c', 'b', 'd'), // 'a' missing
- 'should not match list unless it contains all items'
- );
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsEqualTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsEqualTest.php
deleted file mode 100644
index 73e3ff07e2e..00000000000
--- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsEqualTest.php
+++ /dev/null
@@ -1,102 +0,0 @@
-_arg = $arg;
- }
-
- public function __toString()
- {
- return $this->_arg;
- }
-}
-
-class IsEqualTest extends \Hamcrest\AbstractMatcherTest
-{
-
- protected function createMatcher()
- {
- return \Hamcrest\Core\IsEqual::equalTo('irrelevant');
- }
-
- public function testComparesObjectsUsingEqualityOperator()
- {
- assertThat("hi", equalTo("hi"));
- assertThat("bye", not(equalTo("hi")));
-
- assertThat(1, equalTo(1));
- assertThat(1, not(equalTo(2)));
-
- assertThat("2", equalTo(2));
- }
-
- public function testCanCompareNullValues()
- {
- assertThat(null, equalTo(null));
-
- assertThat(null, not(equalTo('hi')));
- assertThat('hi', not(equalTo(null)));
- }
-
- public function testComparesTheElementsOfAnArray()
- {
- $s1 = array('a', 'b');
- $s2 = array('a', 'b');
- $s3 = array('c', 'd');
- $s4 = array('a', 'b', 'c', 'd');
-
- assertThat($s1, equalTo($s1));
- assertThat($s2, equalTo($s1));
- assertThat($s3, not(equalTo($s1)));
- assertThat($s4, not(equalTo($s1)));
- }
-
- public function testComparesTheElementsOfAnArrayOfPrimitiveTypes()
- {
- $i1 = array(1, 2);
- $i2 = array(1, 2);
- $i3 = array(3, 4);
- $i4 = array(1, 2, 3, 4);
-
- assertThat($i1, equalTo($i1));
- assertThat($i2, equalTo($i1));
- assertThat($i3, not(equalTo($i1)));
- assertThat($i4, not(equalTo($i1)));
- }
-
- public function testRecursivelyTestsElementsOfArrays()
- {
- $i1 = array(array(1, 2), array(3, 4));
- $i2 = array(array(1, 2), array(3, 4));
- $i3 = array(array(5, 6), array(7, 8));
- $i4 = array(array(1, 2, 3, 4), array(3, 4));
-
- assertThat($i1, equalTo($i1));
- assertThat($i2, equalTo($i1));
- assertThat($i3, not(equalTo($i1)));
- assertThat($i4, not(equalTo($i1)));
- }
-
- public function testIncludesTheResultOfCallingToStringOnItsArgumentInTheDescription()
- {
- $argumentDescription = 'ARGUMENT DESCRIPTION';
- $argument = new \Hamcrest\Core\DummyToStringClass($argumentDescription);
- $this->assertDescription('<' . $argumentDescription . '>', equalTo($argument));
- }
-
- public function testReturnsAnObviousDescriptionIfCreatedWithANestedMatcherByMistake()
- {
- $innerMatcher = equalTo('NestedMatcher');
- $this->assertDescription('<' . (string) $innerMatcher . '>', equalTo($innerMatcher));
- }
-
- public function testReturnsGoodDescriptionIfCreatedWithNullReference()
- {
- $this->assertDescription('null', equalTo(null));
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsIdenticalTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsIdenticalTest.php
deleted file mode 100644
index 9cc27946cde..00000000000
--- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsIdenticalTest.php
+++ /dev/null
@@ -1,30 +0,0 @@
-assertDescription('"ARG"', identicalTo('ARG'));
- }
-
- public function testReturnsReadableDescriptionFromToStringWhenInitialisedWithNull()
- {
- $this->assertDescription('null', identicalTo(null));
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsInstanceOfTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsInstanceOfTest.php
deleted file mode 100644
index 7a5f095a228..00000000000
--- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsInstanceOfTest.php
+++ /dev/null
@@ -1,51 +0,0 @@
-_baseClassInstance = new \Hamcrest\Core\SampleBaseClass('good');
- $this->_subClassInstance = new \Hamcrest\Core\SampleSubClass('good');
- }
-
- protected function createMatcher()
- {
- return \Hamcrest\Core\IsInstanceOf::anInstanceOf('stdClass');
- }
-
- public function testEvaluatesToTrueIfArgumentIsInstanceOfASpecificClass()
- {
- assertThat($this->_baseClassInstance, anInstanceOf('Hamcrest\Core\SampleBaseClass'));
- assertThat($this->_subClassInstance, anInstanceOf('Hamcrest\Core\SampleSubClass'));
- assertThat(null, not(anInstanceOf('Hamcrest\Core\SampleBaseClass')));
- assertThat(new \stdClass(), not(anInstanceOf('Hamcrest\Core\SampleBaseClass')));
- }
-
- public function testEvaluatesToFalseIfArgumentIsNotAnObject()
- {
- assertThat(null, not(anInstanceOf('Hamcrest\Core\SampleBaseClass')));
- assertThat(false, not(anInstanceOf('Hamcrest\Core\SampleBaseClass')));
- assertThat(5, not(anInstanceOf('Hamcrest\Core\SampleBaseClass')));
- assertThat('foo', not(anInstanceOf('Hamcrest\Core\SampleBaseClass')));
- assertThat(array(1, 2, 3), not(anInstanceOf('Hamcrest\Core\SampleBaseClass')));
- }
-
- public function testHasAReadableDescription()
- {
- $this->assertDescription('an instance of stdClass', anInstanceOf('stdClass'));
- }
-
- public function testDecribesActualClassInMismatchMessage()
- {
- $this->assertMismatchDescription(
- '[Hamcrest\Core\SampleBaseClass] ',
- anInstanceOf('Hamcrest\Core\SampleSubClass'),
- $this->_baseClassInstance
- );
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsNotTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsNotTest.php
deleted file mode 100644
index 09d4a652af1..00000000000
--- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsNotTest.php
+++ /dev/null
@@ -1,31 +0,0 @@
-assertMatches(not(equalTo('A')), 'B', 'should match');
- $this->assertDoesNotMatch(not(equalTo('B')), 'B', 'should not match');
- }
-
- public function testProvidesConvenientShortcutForNotEqualTo()
- {
- $this->assertMatches(not('A'), 'B', 'should match');
- $this->assertMatches(not('B'), 'A', 'should match');
- $this->assertDoesNotMatch(not('A'), 'A', 'should not match');
- $this->assertDoesNotMatch(not('B'), 'B', 'should not match');
- }
-
- public function testUsesDescriptionOfNegatedMatcherWithPrefix()
- {
- $this->assertDescription('not a value greater than <2>', not(greaterThan(2)));
- $this->assertDescription('not "A"', not('A'));
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsNullTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsNullTest.php
deleted file mode 100644
index bfa42554db5..00000000000
--- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsNullTest.php
+++ /dev/null
@@ -1,20 +0,0 @@
-assertDescription('sameInstance("ARG")', sameInstance('ARG'));
- }
-
- public function testReturnsReadableDescriptionFromToStringWhenInitialisedWithNull()
- {
- $this->assertDescription('sameInstance(null)', sameInstance(null));
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsTest.php
deleted file mode 100644
index bbd848b9f2d..00000000000
--- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsTest.php
+++ /dev/null
@@ -1,33 +0,0 @@
-assertMatches(is(equalTo(true)), true, 'should match');
- $this->assertMatches(is(equalTo(false)), false, 'should match');
- $this->assertDoesNotMatch(is(equalTo(true)), false, 'should not match');
- $this->assertDoesNotMatch(is(equalTo(false)), true, 'should not match');
- }
-
- public function testGeneratesIsPrefixInDescription()
- {
- $this->assertDescription('is ', is(equalTo(true)));
- }
-
- public function testProvidesConvenientShortcutForIsEqualTo()
- {
- $this->assertMatches(is('A'), 'A', 'should match');
- $this->assertMatches(is('B'), 'B', 'should match');
- $this->assertDoesNotMatch(is('A'), 'B', 'should not match');
- $this->assertDoesNotMatch(is('B'), 'A', 'should not match');
- $this->assertDescription('is "A"', is('A'));
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsTypeOfTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsTypeOfTest.php
deleted file mode 100644
index 3f48dea70ad..00000000000
--- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/IsTypeOfTest.php
+++ /dev/null
@@ -1,45 +0,0 @@
-assertDescription('a double', typeOf('double'));
- $this->assertDescription('an integer', typeOf('integer'));
- }
-
- public function testDecribesActualTypeInMismatchMessage()
- {
- $this->assertMismatchDescription('was null', typeOf('boolean'), null);
- $this->assertMismatchDescription('was an integer <5>', typeOf('float'), 5);
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/SampleBaseClass.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/SampleBaseClass.php
deleted file mode 100644
index c953e7cd749..00000000000
--- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/SampleBaseClass.php
+++ /dev/null
@@ -1,18 +0,0 @@
-_arg = $arg;
- }
-
- public function __toString()
- {
- return $this->_arg;
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/SampleSubClass.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/SampleSubClass.php
deleted file mode 100644
index 822f1b6414e..00000000000
--- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/SampleSubClass.php
+++ /dev/null
@@ -1,6 +0,0 @@
-_instanceProperty);
- }
-
- protected function createMatcher()
- {
- return \Hamcrest\Core\Set::set('property_name');
- }
-
- public function testEvaluatesToTrueIfArrayPropertyIsSet()
- {
- assertThat(array('foo' => 'bar'), set('foo'));
- }
-
- public function testNegatedEvaluatesToFalseIfArrayPropertyIsSet()
- {
- assertThat(array('foo' => 'bar'), not(notSet('foo')));
- }
-
- public function testEvaluatesToTrueIfClassPropertyIsSet()
- {
- self::$_classProperty = 'bar';
- assertThat('Hamcrest\Core\SetTest', set('_classProperty'));
- }
-
- public function testNegatedEvaluatesToFalseIfClassPropertyIsSet()
- {
- self::$_classProperty = 'bar';
- assertThat('Hamcrest\Core\SetTest', not(notSet('_classProperty')));
- }
-
- public function testEvaluatesToTrueIfObjectPropertyIsSet()
- {
- $this->_instanceProperty = 'bar';
- assertThat($this, set('_instanceProperty'));
- }
-
- public function testNegatedEvaluatesToFalseIfObjectPropertyIsSet()
- {
- $this->_instanceProperty = 'bar';
- assertThat($this, not(notSet('_instanceProperty')));
- }
-
- public function testEvaluatesToFalseIfArrayPropertyIsNotSet()
- {
- assertThat(array('foo' => 'bar'), not(set('baz')));
- }
-
- public function testNegatedEvaluatesToTrueIfArrayPropertyIsNotSet()
- {
- assertThat(array('foo' => 'bar'), notSet('baz'));
- }
-
- public function testEvaluatesToFalseIfClassPropertyIsNotSet()
- {
- assertThat('Hamcrest\Core\SetTest', not(set('_classProperty')));
- }
-
- public function testNegatedEvaluatesToTrueIfClassPropertyIsNotSet()
- {
- assertThat('Hamcrest\Core\SetTest', notSet('_classProperty'));
- }
-
- public function testEvaluatesToFalseIfObjectPropertyIsNotSet()
- {
- assertThat($this, not(set('_instanceProperty')));
- }
-
- public function testNegatedEvaluatesToTrueIfObjectPropertyIsNotSet()
- {
- assertThat($this, notSet('_instanceProperty'));
- }
-
- public function testHasAReadableDescription()
- {
- $this->assertDescription('set property foo', set('foo'));
- $this->assertDescription('unset property bar', notSet('bar'));
- }
-
- public function testDecribesPropertySettingInMismatchMessage()
- {
- $this->assertMismatchDescription(
- 'was not set',
- set('bar'),
- array('foo' => 'bar')
- );
- $this->assertMismatchDescription(
- 'was "bar"',
- notSet('foo'),
- array('foo' => 'bar')
- );
- self::$_classProperty = 'bar';
- $this->assertMismatchDescription(
- 'was "bar"',
- notSet('_classProperty'),
- 'Hamcrest\Core\SetTest'
- );
- $this->_instanceProperty = 'bar';
- $this->assertMismatchDescription(
- 'was "bar"',
- notSet('_instanceProperty'),
- $this
- );
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/FeatureMatcherTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/FeatureMatcherTest.php
deleted file mode 100644
index 7543294ae45..00000000000
--- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/FeatureMatcherTest.php
+++ /dev/null
@@ -1,73 +0,0 @@
-_result = $result;
- }
- public function getResult()
- {
- return $this->_result;
- }
-}
-
-/* Test-specific subclass only */
-class ResultMatcher extends \Hamcrest\FeatureMatcher
-{
- public function __construct()
- {
- parent::__construct(self::TYPE_ANY, null, equalTo('bar'), 'Thingy with result', 'result');
- }
- public function featureValueOf($actual)
- {
- if ($actual instanceof \Hamcrest\Thingy) {
- return $actual->getResult();
- }
- }
-}
-
-class FeatureMatcherTest extends \Hamcrest\AbstractMatcherTest
-{
-
- private $_resultMatcher;
-
- public function setUp()
- {
- $this->_resultMatcher = $this->_resultMatcher();
- }
-
- protected function createMatcher()
- {
- return $this->_resultMatcher();
- }
-
- public function testMatchesPartOfAnObject()
- {
- $this->assertMatches($this->_resultMatcher, new \Hamcrest\Thingy('bar'), 'feature');
- $this->assertDescription('Thingy with result "bar"', $this->_resultMatcher);
- }
-
- public function testMismatchesPartOfAnObject()
- {
- $this->assertMismatchDescription(
- 'result was "foo"',
- $this->_resultMatcher,
- new \Hamcrest\Thingy('foo')
- );
- }
-
- public function testDoesNotGenerateNoticesForNull()
- {
- $this->assertMismatchDescription('result was null', $this->_resultMatcher, null);
- }
-
- // -- Creation Methods
-
- private function _resultMatcher()
- {
- return new \Hamcrest\ResultMatcher();
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/MatcherAssertTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/MatcherAssertTest.php
deleted file mode 100644
index 218371211ca..00000000000
--- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/MatcherAssertTest.php
+++ /dev/null
@@ -1,190 +0,0 @@
-getMessage());
- }
- try {
- \Hamcrest\MatcherAssert::assertThat(null);
- self::fail('expected assertion failure');
- } catch (\Hamcrest\AssertionError $ex) {
- self::assertEquals('', $ex->getMessage());
- }
- try {
- \Hamcrest\MatcherAssert::assertThat('');
- self::fail('expected assertion failure');
- } catch (\Hamcrest\AssertionError $ex) {
- self::assertEquals('', $ex->getMessage());
- }
- try {
- \Hamcrest\MatcherAssert::assertThat(0);
- self::fail('expected assertion failure');
- } catch (\Hamcrest\AssertionError $ex) {
- self::assertEquals('', $ex->getMessage());
- }
- try {
- \Hamcrest\MatcherAssert::assertThat(0.0);
- self::fail('expected assertion failure');
- } catch (\Hamcrest\AssertionError $ex) {
- self::assertEquals('', $ex->getMessage());
- }
- try {
- \Hamcrest\MatcherAssert::assertThat(array());
- self::fail('expected assertion failure');
- } catch (\Hamcrest\AssertionError $ex) {
- self::assertEquals('', $ex->getMessage());
- }
- self::assertEquals(6, \Hamcrest\MatcherAssert::getCount(), 'assertion count');
- }
-
- public function testAssertThatWithIdentifierAndTrueArgPasses()
- {
- \Hamcrest\MatcherAssert::assertThat('identifier', true);
- \Hamcrest\MatcherAssert::assertThat('identifier', 'non-empty');
- \Hamcrest\MatcherAssert::assertThat('identifier', 1);
- \Hamcrest\MatcherAssert::assertThat('identifier', 3.14159);
- \Hamcrest\MatcherAssert::assertThat('identifier', array(true));
- self::assertEquals(5, \Hamcrest\MatcherAssert::getCount(), 'assertion count');
- }
-
- public function testAssertThatWithIdentifierAndFalseArgFails()
- {
- try {
- \Hamcrest\MatcherAssert::assertThat('identifier', false);
- self::fail('expected assertion failure');
- } catch (\Hamcrest\AssertionError $ex) {
- self::assertEquals('identifier', $ex->getMessage());
- }
- try {
- \Hamcrest\MatcherAssert::assertThat('identifier', null);
- self::fail('expected assertion failure');
- } catch (\Hamcrest\AssertionError $ex) {
- self::assertEquals('identifier', $ex->getMessage());
- }
- try {
- \Hamcrest\MatcherAssert::assertThat('identifier', '');
- self::fail('expected assertion failure');
- } catch (\Hamcrest\AssertionError $ex) {
- self::assertEquals('identifier', $ex->getMessage());
- }
- try {
- \Hamcrest\MatcherAssert::assertThat('identifier', 0);
- self::fail('expected assertion failure');
- } catch (\Hamcrest\AssertionError $ex) {
- self::assertEquals('identifier', $ex->getMessage());
- }
- try {
- \Hamcrest\MatcherAssert::assertThat('identifier', 0.0);
- self::fail('expected assertion failure');
- } catch (\Hamcrest\AssertionError $ex) {
- self::assertEquals('identifier', $ex->getMessage());
- }
- try {
- \Hamcrest\MatcherAssert::assertThat('identifier', array());
- self::fail('expected assertion failure');
- } catch (\Hamcrest\AssertionError $ex) {
- self::assertEquals('identifier', $ex->getMessage());
- }
- self::assertEquals(6, \Hamcrest\MatcherAssert::getCount(), 'assertion count');
- }
-
- public function testAssertThatWithActualValueAndMatcherArgsThatMatchPasses()
- {
- \Hamcrest\MatcherAssert::assertThat(true, is(true));
- self::assertEquals(1, \Hamcrest\MatcherAssert::getCount(), 'assertion count');
- }
-
- public function testAssertThatWithActualValueAndMatcherArgsThatDontMatchFails()
- {
- $expected = 'expected';
- $actual = 'actual';
-
- $expectedMessage =
- 'Expected: "expected"' . PHP_EOL .
- ' but: was "actual"';
-
- try {
- \Hamcrest\MatcherAssert::assertThat($actual, equalTo($expected));
- self::fail('expected assertion failure');
- } catch (\Hamcrest\AssertionError $ex) {
- self::assertEquals($expectedMessage, $ex->getMessage());
- self::assertEquals(1, \Hamcrest\MatcherAssert::getCount(), 'assertion count');
- }
- }
-
- public function testAssertThatWithIdentifierAndActualValueAndMatcherArgsThatMatchPasses()
- {
- \Hamcrest\MatcherAssert::assertThat('identifier', true, is(true));
- self::assertEquals(1, \Hamcrest\MatcherAssert::getCount(), 'assertion count');
- }
-
- public function testAssertThatWithIdentifierAndActualValueAndMatcherArgsThatDontMatchFails()
- {
- $expected = 'expected';
- $actual = 'actual';
-
- $expectedMessage =
- 'identifier' . PHP_EOL .
- 'Expected: "expected"' . PHP_EOL .
- ' but: was "actual"';
-
- try {
- \Hamcrest\MatcherAssert::assertThat('identifier', $actual, equalTo($expected));
- self::fail('expected assertion failure');
- } catch (\Hamcrest\AssertionError $ex) {
- self::assertEquals($expectedMessage, $ex->getMessage());
- self::assertEquals(1, \Hamcrest\MatcherAssert::getCount(), 'assertion count');
- }
- }
-
- public function testAssertThatWithNoArgsThrowsErrorAndDoesntIncrementCount()
- {
- try {
- \Hamcrest\MatcherAssert::assertThat();
- self::fail('expected invalid argument exception');
- } catch (\InvalidArgumentException $ex) {
- self::assertEquals(0, \Hamcrest\MatcherAssert::getCount(), 'assertion count');
- }
- }
-
- public function testAssertThatWithFourArgsThrowsErrorAndDoesntIncrementCount()
- {
- try {
- \Hamcrest\MatcherAssert::assertThat(1, 2, 3, 4);
- self::fail('expected invalid argument exception');
- } catch (\InvalidArgumentException $ex) {
- self::assertEquals(0, \Hamcrest\MatcherAssert::getCount(), 'assertion count');
- }
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Number/IsCloseToTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Number/IsCloseToTest.php
deleted file mode 100644
index 987d55267ea..00000000000
--- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Number/IsCloseToTest.php
+++ /dev/null
@@ -1,27 +0,0 @@
-assertTrue($p->matches(1.0));
- $this->assertTrue($p->matches(0.5));
- $this->assertTrue($p->matches(1.5));
-
- $this->assertDoesNotMatch($p, 2.0, 'too large');
- $this->assertMismatchDescription('<2F> differed by <0.5F>', $p, 2.0);
- $this->assertDoesNotMatch($p, 0.0, 'number too small');
- $this->assertMismatchDescription('<0F> differed by <0.5F>', $p, 0.0);
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Number/OrderingComparisonTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Number/OrderingComparisonTest.php
deleted file mode 100644
index a4c94d37371..00000000000
--- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Number/OrderingComparisonTest.php
+++ /dev/null
@@ -1,41 +0,0 @@
-_text = $text;
- }
-
- public function describeTo(\Hamcrest\Description $description)
- {
- $description->appendText($this->_text);
- }
-}
-
-class StringDescriptionTest extends \PhpUnit_Framework_TestCase
-{
-
- private $_description;
-
- public function setUp()
- {
- $this->_description = new \Hamcrest\StringDescription();
- }
-
- public function testAppendTextAppendsTextInformation()
- {
- $this->_description->appendText('foo')->appendText('bar');
- $this->assertEquals('foobar', (string) $this->_description);
- }
-
- public function testAppendValueCanAppendTextTypes()
- {
- $this->_description->appendValue('foo');
- $this->assertEquals('"foo"', (string) $this->_description);
- }
-
- public function testSpecialCharactersAreEscapedForStringTypes()
- {
- $this->_description->appendValue("foo\\bar\"zip\r\n");
- $this->assertEquals('"foo\\bar\\"zip\r\n"', (string) $this->_description);
- }
-
- public function testIntegerValuesCanBeAppended()
- {
- $this->_description->appendValue(42);
- $this->assertEquals('<42>', (string) $this->_description);
- }
-
- public function testFloatValuesCanBeAppended()
- {
- $this->_description->appendValue(42.78);
- $this->assertEquals('<42.78F>', (string) $this->_description);
- }
-
- public function testNullValuesCanBeAppended()
- {
- $this->_description->appendValue(null);
- $this->assertEquals('null', (string) $this->_description);
- }
-
- public function testArraysCanBeAppended()
- {
- $this->_description->appendValue(array('foo', 42.78));
- $this->assertEquals('["foo", <42.78F>]', (string) $this->_description);
- }
-
- public function testObjectsCanBeAppended()
- {
- $this->_description->appendValue(new \stdClass());
- $this->assertEquals('', (string) $this->_description);
- }
-
- public function testBooleanValuesCanBeAppended()
- {
- $this->_description->appendValue(false);
- $this->assertEquals('', (string) $this->_description);
- }
-
- public function testListsOfvaluesCanBeAppended()
- {
- $this->_description->appendValue(array('foo', 42.78));
- $this->assertEquals('["foo", <42.78F>]', (string) $this->_description);
- }
-
- public function testIterableOfvaluesCanBeAppended()
- {
- $items = new \ArrayObject(array('foo', 42.78));
- $this->_description->appendValue($items);
- $this->assertEquals('["foo", <42.78F>]', (string) $this->_description);
- }
-
- public function testIteratorOfvaluesCanBeAppended()
- {
- $items = new \ArrayObject(array('foo', 42.78));
- $this->_description->appendValue($items->getIterator());
- $this->assertEquals('["foo", <42.78F>]', (string) $this->_description);
- }
-
- public function testListsOfvaluesCanBeAppendedManually()
- {
- $this->_description->appendValueList('@start@', '@sep@ ', '@end@', array('foo', 42.78));
- $this->assertEquals('@start@"foo"@sep@ <42.78F>@end@', (string) $this->_description);
- }
-
- public function testIterableOfvaluesCanBeAppendedManually()
- {
- $items = new \ArrayObject(array('foo', 42.78));
- $this->_description->appendValueList('@start@', '@sep@ ', '@end@', $items);
- $this->assertEquals('@start@"foo"@sep@ <42.78F>@end@', (string) $this->_description);
- }
-
- public function testIteratorOfvaluesCanBeAppendedManually()
- {
- $items = new \ArrayObject(array('foo', 42.78));
- $this->_description->appendValueList('@start@', '@sep@ ', '@end@', $items->getIterator());
- $this->assertEquals('@start@"foo"@sep@ <42.78F>@end@', (string) $this->_description);
- }
-
- public function testSelfDescribingObjectsCanBeAppended()
- {
- $this->_description
- ->appendDescriptionOf(new \Hamcrest\SampleSelfDescriber('foo'))
- ->appendDescriptionOf(new \Hamcrest\SampleSelfDescriber('bar'))
- ;
- $this->assertEquals('foobar', (string) $this->_description);
- }
-
- public function testSelfDescribingObjectsCanBeAppendedAsLists()
- {
- $this->_description->appendList('@start@', '@sep@ ', '@end@', array(
- new \Hamcrest\SampleSelfDescriber('foo'),
- new \Hamcrest\SampleSelfDescriber('bar')
- ));
- $this->assertEquals('@start@foo@sep@ bar@end@', (string) $this->_description);
- }
-
- public function testSelfDescribingObjectsCanBeAppendedAsIteratedLists()
- {
- $items = new \ArrayObject(array(
- new \Hamcrest\SampleSelfDescriber('foo'),
- new \Hamcrest\SampleSelfDescriber('bar')
- ));
- $this->_description->appendList('@start@', '@sep@ ', '@end@', $items);
- $this->assertEquals('@start@foo@sep@ bar@end@', (string) $this->_description);
- }
-
- public function testSelfDescribingObjectsCanBeAppendedAsIterators()
- {
- $items = new \ArrayObject(array(
- new \Hamcrest\SampleSelfDescriber('foo'),
- new \Hamcrest\SampleSelfDescriber('bar')
- ));
- $this->_description->appendList('@start@', '@sep@ ', '@end@', $items->getIterator());
- $this->assertEquals('@start@foo@sep@ bar@end@', (string) $this->_description);
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/IsEmptyStringTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/IsEmptyStringTest.php
deleted file mode 100644
index 8d5c56be1af..00000000000
--- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/IsEmptyStringTest.php
+++ /dev/null
@@ -1,86 +0,0 @@
-assertDoesNotMatch(emptyString(), null, 'null');
- }
-
- public function testEmptyDoesNotMatchZero()
- {
- $this->assertDoesNotMatch(emptyString(), 0, 'zero');
- }
-
- public function testEmptyDoesNotMatchFalse()
- {
- $this->assertDoesNotMatch(emptyString(), false, 'false');
- }
-
- public function testEmptyDoesNotMatchEmptyArray()
- {
- $this->assertDoesNotMatch(emptyString(), array(), 'empty array');
- }
-
- public function testEmptyMatchesEmptyString()
- {
- $this->assertMatches(emptyString(), '', 'empty string');
- }
-
- public function testEmptyDoesNotMatchNonEmptyString()
- {
- $this->assertDoesNotMatch(emptyString(), 'foo', 'non-empty string');
- }
-
- public function testEmptyHasAReadableDescription()
- {
- $this->assertDescription('an empty string', emptyString());
- }
-
- public function testEmptyOrNullMatchesNull()
- {
- $this->assertMatches(nullOrEmptyString(), null, 'null');
- }
-
- public function testEmptyOrNullMatchesEmptyString()
- {
- $this->assertMatches(nullOrEmptyString(), '', 'empty string');
- }
-
- public function testEmptyOrNullDoesNotMatchNonEmptyString()
- {
- $this->assertDoesNotMatch(nullOrEmptyString(), 'foo', 'non-empty string');
- }
-
- public function testEmptyOrNullHasAReadableDescription()
- {
- $this->assertDescription('(null or an empty string)', nullOrEmptyString());
- }
-
- public function testNonEmptyDoesNotMatchNull()
- {
- $this->assertDoesNotMatch(nonEmptyString(), null, 'null');
- }
-
- public function testNonEmptyDoesNotMatchEmptyString()
- {
- $this->assertDoesNotMatch(nonEmptyString(), '', 'empty string');
- }
-
- public function testNonEmptyMatchesNonEmptyString()
- {
- $this->assertMatches(nonEmptyString(), 'foo', 'non-empty string');
- }
-
- public function testNonEmptyHasAReadableDescription()
- {
- $this->assertDescription('a non-empty string', nonEmptyString());
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/IsEqualIgnoringCaseTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/IsEqualIgnoringCaseTest.php
deleted file mode 100644
index 0539fd5cb72..00000000000
--- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/IsEqualIgnoringCaseTest.php
+++ /dev/null
@@ -1,40 +0,0 @@
-assertDescription(
- 'equalToIgnoringCase("heLLo")',
- equalToIgnoringCase('heLLo')
- );
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/IsEqualIgnoringWhiteSpaceTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/IsEqualIgnoringWhiteSpaceTest.php
deleted file mode 100644
index 6c2304f4321..00000000000
--- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/IsEqualIgnoringWhiteSpaceTest.php
+++ /dev/null
@@ -1,51 +0,0 @@
-_matcher = \Hamcrest\Text\IsEqualIgnoringWhiteSpace::equalToIgnoringWhiteSpace(
- "Hello World how\n are we? "
- );
- }
-
- protected function createMatcher()
- {
- return $this->_matcher;
- }
-
- public function testPassesIfWordsAreSameButWhitespaceDiffers()
- {
- assertThat('Hello World how are we?', $this->_matcher);
- assertThat(" Hello \rWorld \t how are\nwe?", $this->_matcher);
- }
-
- public function testFailsIfTextOtherThanWhitespaceDiffers()
- {
- assertThat('Hello PLANET how are we?', not($this->_matcher));
- assertThat('Hello World how are we', not($this->_matcher));
- }
-
- public function testFailsIfWhitespaceIsAddedOrRemovedInMidWord()
- {
- assertThat('HelloWorld how are we?', not($this->_matcher));
- assertThat('Hello Wo rld how are we?', not($this->_matcher));
- }
-
- public function testFailsIfMatchingAgainstNull()
- {
- assertThat(null, not($this->_matcher));
- }
-
- public function testHasAReadableDescription()
- {
- $this->assertDescription(
- "equalToIgnoringWhiteSpace(\"Hello World how\\n are we? \")",
- $this->_matcher
- );
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/MatchesPatternTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/MatchesPatternTest.php
deleted file mode 100644
index 4891598f656..00000000000
--- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/MatchesPatternTest.php
+++ /dev/null
@@ -1,30 +0,0 @@
-assertDescription('a string matching "pattern"', matchesPattern('pattern'));
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/StringContainsIgnoringCaseTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/StringContainsIgnoringCaseTest.php
deleted file mode 100644
index 3b5b08e3bc2..00000000000
--- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/StringContainsIgnoringCaseTest.php
+++ /dev/null
@@ -1,80 +0,0 @@
-_stringContains = \Hamcrest\Text\StringContainsIgnoringCase::containsStringIgnoringCase(
- strtolower(self::EXCERPT)
- );
- }
-
- protected function createMatcher()
- {
- return $this->_stringContains;
- }
-
- public function testEvaluatesToTrueIfArgumentContainsSpecifiedSubstring()
- {
- $this->assertTrue(
- $this->_stringContains->matches(self::EXCERPT . 'END'),
- 'should be true if excerpt at beginning'
- );
- $this->assertTrue(
- $this->_stringContains->matches('START' . self::EXCERPT),
- 'should be true if excerpt at end'
- );
- $this->assertTrue(
- $this->_stringContains->matches('START' . self::EXCERPT . 'END'),
- 'should be true if excerpt in middle'
- );
- $this->assertTrue(
- $this->_stringContains->matches(self::EXCERPT . self::EXCERPT),
- 'should be true if excerpt is repeated'
- );
-
- $this->assertFalse(
- $this->_stringContains->matches('Something else'),
- 'should not be true if excerpt is not in string'
- );
- $this->assertFalse(
- $this->_stringContains->matches(substr(self::EXCERPT, 1)),
- 'should not be true if part of excerpt is in string'
- );
- }
-
- public function testEvaluatesToTrueIfArgumentIsEqualToSubstring()
- {
- $this->assertTrue(
- $this->_stringContains->matches(self::EXCERPT),
- 'should be true if excerpt is entire string'
- );
- }
-
- public function testEvaluatesToTrueIfArgumentContainsExactSubstring()
- {
- $this->assertTrue(
- $this->_stringContains->matches(strtolower(self::EXCERPT)),
- 'should be false if excerpt is entire string ignoring case'
- );
- $this->assertTrue(
- $this->_stringContains->matches('START' . strtolower(self::EXCERPT) . 'END'),
- 'should be false if excerpt is contained in string ignoring case'
- );
- }
-
- public function testHasAReadableDescription()
- {
- $this->assertDescription(
- 'a string containing in any case "'
- . strtolower(self::EXCERPT) . '"',
- $this->_stringContains
- );
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/StringContainsInOrderTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/StringContainsInOrderTest.php
deleted file mode 100644
index 0be70629fb3..00000000000
--- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/StringContainsInOrderTest.php
+++ /dev/null
@@ -1,42 +0,0 @@
-_m = \Hamcrest\Text\StringContainsInOrder::stringContainsInOrder(array('a', 'b', 'c'));
- }
-
- protected function createMatcher()
- {
- return $this->_m;
- }
-
- public function testMatchesOnlyIfStringContainsGivenSubstringsInTheSameOrder()
- {
- $this->assertMatches($this->_m, 'abc', 'substrings in order');
- $this->assertMatches($this->_m, '1a2b3c4', 'substrings separated');
-
- $this->assertDoesNotMatch($this->_m, 'cab', 'substrings out of order');
- $this->assertDoesNotMatch($this->_m, 'xyz', 'no substrings in string');
- $this->assertDoesNotMatch($this->_m, 'ac', 'substring missing');
- $this->assertDoesNotMatch($this->_m, '', 'empty string');
- }
-
- public function testAcceptsVariableArguments()
- {
- $this->assertMatches(stringContainsInOrder('a', 'b', 'c'), 'abc', 'substrings as variable arguments');
- }
-
- public function testHasAReadableDescription()
- {
- $this->assertDescription(
- 'a string containing "a", "b", "c" in order',
- $this->_m
- );
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/StringContainsTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/StringContainsTest.php
deleted file mode 100644
index 203fd918ddf..00000000000
--- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/StringContainsTest.php
+++ /dev/null
@@ -1,86 +0,0 @@
-_stringContains = \Hamcrest\Text\StringContains::containsString(self::EXCERPT);
- }
-
- protected function createMatcher()
- {
- return $this->_stringContains;
- }
-
- public function testEvaluatesToTrueIfArgumentContainsSubstring()
- {
- $this->assertTrue(
- $this->_stringContains->matches(self::EXCERPT . 'END'),
- 'should be true if excerpt at beginning'
- );
- $this->assertTrue(
- $this->_stringContains->matches('START' . self::EXCERPT),
- 'should be true if excerpt at end'
- );
- $this->assertTrue(
- $this->_stringContains->matches('START' . self::EXCERPT . 'END'),
- 'should be true if excerpt in middle'
- );
- $this->assertTrue(
- $this->_stringContains->matches(self::EXCERPT . self::EXCERPT),
- 'should be true if excerpt is repeated'
- );
-
- $this->assertFalse(
- $this->_stringContains->matches('Something else'),
- 'should not be true if excerpt is not in string'
- );
- $this->assertFalse(
- $this->_stringContains->matches(substr(self::EXCERPT, 1)),
- 'should not be true if part of excerpt is in string'
- );
- }
-
- public function testEvaluatesToTrueIfArgumentIsEqualToSubstring()
- {
- $this->assertTrue(
- $this->_stringContains->matches(self::EXCERPT),
- 'should be true if excerpt is entire string'
- );
- }
-
- public function testEvaluatesToFalseIfArgumentContainsSubstringIgnoringCase()
- {
- $this->assertFalse(
- $this->_stringContains->matches(strtolower(self::EXCERPT)),
- 'should be false if excerpt is entire string ignoring case'
- );
- $this->assertFalse(
- $this->_stringContains->matches('START' . strtolower(self::EXCERPT) . 'END'),
- 'should be false if excerpt is contained in string ignoring case'
- );
- }
-
- public function testIgnoringCaseReturnsCorrectMatcher()
- {
- $this->assertTrue(
- $this->_stringContains->ignoringCase()->matches('EXceRpT'),
- 'should be true if excerpt is entire string ignoring case'
- );
- }
-
- public function testHasAReadableDescription()
- {
- $this->assertDescription(
- 'a string containing "'
- . self::EXCERPT . '"',
- $this->_stringContains
- );
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/StringEndsWithTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/StringEndsWithTest.php
deleted file mode 100644
index fffa3c9cdd8..00000000000
--- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/StringEndsWithTest.php
+++ /dev/null
@@ -1,62 +0,0 @@
-_stringEndsWith = \Hamcrest\Text\StringEndsWith::endsWith(self::EXCERPT);
- }
-
- protected function createMatcher()
- {
- return $this->_stringEndsWith;
- }
-
- public function testEvaluatesToTrueIfArgumentContainsSpecifiedSubstring()
- {
- $this->assertFalse(
- $this->_stringEndsWith->matches(self::EXCERPT . 'END'),
- 'should be false if excerpt at beginning'
- );
- $this->assertTrue(
- $this->_stringEndsWith->matches('START' . self::EXCERPT),
- 'should be true if excerpt at end'
- );
- $this->assertFalse(
- $this->_stringEndsWith->matches('START' . self::EXCERPT . 'END'),
- 'should be false if excerpt in middle'
- );
- $this->assertTrue(
- $this->_stringEndsWith->matches(self::EXCERPT . self::EXCERPT),
- 'should be true if excerpt is at end and repeated'
- );
-
- $this->assertFalse(
- $this->_stringEndsWith->matches('Something else'),
- 'should be false if excerpt is not in string'
- );
- $this->assertFalse(
- $this->_stringEndsWith->matches(substr(self::EXCERPT, 0, strlen(self::EXCERPT) - 2)),
- 'should be false if part of excerpt is at end of string'
- );
- }
-
- public function testEvaluatesToTrueIfArgumentIsEqualToSubstring()
- {
- $this->assertTrue(
- $this->_stringEndsWith->matches(self::EXCERPT),
- 'should be true if excerpt is entire string'
- );
- }
-
- public function testHasAReadableDescription()
- {
- $this->assertDescription('a string ending with "EXCERPT"', $this->_stringEndsWith);
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/StringStartsWithTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/StringStartsWithTest.php
deleted file mode 100644
index fc3761bdef2..00000000000
--- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Text/StringStartsWithTest.php
+++ /dev/null
@@ -1,62 +0,0 @@
-_stringStartsWith = \Hamcrest\Text\StringStartsWith::startsWith(self::EXCERPT);
- }
-
- protected function createMatcher()
- {
- return $this->_stringStartsWith;
- }
-
- public function testEvaluatesToTrueIfArgumentContainsSpecifiedSubstring()
- {
- $this->assertTrue(
- $this->_stringStartsWith->matches(self::EXCERPT . 'END'),
- 'should be true if excerpt at beginning'
- );
- $this->assertFalse(
- $this->_stringStartsWith->matches('START' . self::EXCERPT),
- 'should be false if excerpt at end'
- );
- $this->assertFalse(
- $this->_stringStartsWith->matches('START' . self::EXCERPT . 'END'),
- 'should be false if excerpt in middle'
- );
- $this->assertTrue(
- $this->_stringStartsWith->matches(self::EXCERPT . self::EXCERPT),
- 'should be true if excerpt is at beginning and repeated'
- );
-
- $this->assertFalse(
- $this->_stringStartsWith->matches('Something else'),
- 'should be false if excerpt is not in string'
- );
- $this->assertFalse(
- $this->_stringStartsWith->matches(substr(self::EXCERPT, 1)),
- 'should be false if part of excerpt is at start of string'
- );
- }
-
- public function testEvaluatesToTrueIfArgumentIsEqualToSubstring()
- {
- $this->assertTrue(
- $this->_stringStartsWith->matches(self::EXCERPT),
- 'should be true if excerpt is entire string'
- );
- }
-
- public function testHasAReadableDescription()
- {
- $this->assertDescription('a string starting with "EXCERPT"', $this->_stringStartsWith);
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsArrayTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsArrayTest.php
deleted file mode 100644
index d13c24d2c53..00000000000
--- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsArrayTest.php
+++ /dev/null
@@ -1,35 +0,0 @@
-assertDescription('an array', arrayValue());
- }
-
- public function testDecribesActualTypeInMismatchMessage()
- {
- $this->assertMismatchDescription('was null', arrayValue(), null);
- $this->assertMismatchDescription('was a string "foo"', arrayValue(), 'foo');
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsBooleanTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsBooleanTest.php
deleted file mode 100644
index 24309fc09fb..00000000000
--- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsBooleanTest.php
+++ /dev/null
@@ -1,35 +0,0 @@
-assertDescription('a boolean', booleanValue());
- }
-
- public function testDecribesActualTypeInMismatchMessage()
- {
- $this->assertMismatchDescription('was null', booleanValue(), null);
- $this->assertMismatchDescription('was a string "foo"', booleanValue(), 'foo');
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsCallableTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsCallableTest.php
deleted file mode 100644
index 5098e21ba9f..00000000000
--- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsCallableTest.php
+++ /dev/null
@@ -1,103 +0,0 @@
-=')) {
- $this->markTestSkipped('Closures require php 5.3');
- }
- eval('assertThat(function () {}, callableValue());');
- }
-
- public function testEvaluatesToTrueIfArgumentImplementsInvoke()
- {
- if (!version_compare(PHP_VERSION, '5.3', '>=')) {
- $this->markTestSkipped('Magic method __invoke() requires php 5.3');
- }
- assertThat($this, callableValue());
- }
-
- public function testEvaluatesToFalseIfArgumentIsInvalidFunctionName()
- {
- if (function_exists('not_a_Hamcrest_function')) {
- $this->markTestSkipped('Function "not_a_Hamcrest_function" must not exist');
- }
-
- assertThat('not_a_Hamcrest_function', not(callableValue()));
- }
-
- public function testEvaluatesToFalseIfArgumentIsInvalidStaticMethodCallback()
- {
- assertThat(
- array('Hamcrest\Type\IsCallableTest', 'noMethod'),
- not(callableValue())
- );
- }
-
- public function testEvaluatesToFalseIfArgumentIsInvalidInstanceMethodCallback()
- {
- assertThat(array($this, 'noMethod'), not(callableValue()));
- }
-
- public function testEvaluatesToFalseIfArgumentDoesntImplementInvoke()
- {
- assertThat(new \stdClass(), not(callableValue()));
- }
-
- public function testEvaluatesToFalseIfArgumentDoesntMatchType()
- {
- assertThat(false, not(callableValue()));
- assertThat(5.2, not(callableValue()));
- }
-
- public function testHasAReadableDescription()
- {
- $this->assertDescription('a callable', callableValue());
- }
-
- public function testDecribesActualTypeInMismatchMessage()
- {
- $this->assertMismatchDescription(
- 'was a string "invalid-function"',
- callableValue(),
- 'invalid-function'
- );
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsDoubleTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsDoubleTest.php
deleted file mode 100644
index 85c2a963cdf..00000000000
--- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsDoubleTest.php
+++ /dev/null
@@ -1,35 +0,0 @@
-assertDescription('a double', doubleValue());
- }
-
- public function testDecribesActualTypeInMismatchMessage()
- {
- $this->assertMismatchDescription('was null', doubleValue(), null);
- $this->assertMismatchDescription('was a string "foo"', doubleValue(), 'foo');
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsIntegerTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsIntegerTest.php
deleted file mode 100644
index ce5a51a9f96..00000000000
--- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsIntegerTest.php
+++ /dev/null
@@ -1,36 +0,0 @@
-assertDescription('an integer', integerValue());
- }
-
- public function testDecribesActualTypeInMismatchMessage()
- {
- $this->assertMismatchDescription('was null', integerValue(), null);
- $this->assertMismatchDescription('was a string "foo"', integerValue(), 'foo');
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsNumericTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsNumericTest.php
deleted file mode 100644
index e7184857291..00000000000
--- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsNumericTest.php
+++ /dev/null
@@ -1,49 +0,0 @@
-assertDescription('a number', numericValue());
- }
-
- public function testDecribesActualTypeInMismatchMessage()
- {
- $this->assertMismatchDescription('was null', numericValue(), null);
- $this->assertMismatchDescription('was a string "foo"', numericValue(), 'foo');
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsObjectTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsObjectTest.php
deleted file mode 100644
index a3b617c2070..00000000000
--- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsObjectTest.php
+++ /dev/null
@@ -1,34 +0,0 @@
-assertDescription('an object', objectValue());
- }
-
- public function testDecribesActualTypeInMismatchMessage()
- {
- $this->assertMismatchDescription('was null', objectValue(), null);
- $this->assertMismatchDescription('was a string "foo"', objectValue(), 'foo');
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsResourceTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsResourceTest.php
deleted file mode 100644
index d6ea5348430..00000000000
--- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsResourceTest.php
+++ /dev/null
@@ -1,34 +0,0 @@
-assertDescription('a resource', resourceValue());
- }
-
- public function testDecribesActualTypeInMismatchMessage()
- {
- $this->assertMismatchDescription('was null', resourceValue(), null);
- $this->assertMismatchDescription('was a string "foo"', resourceValue(), 'foo');
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsScalarTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsScalarTest.php
deleted file mode 100644
index 72a188d6740..00000000000
--- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsScalarTest.php
+++ /dev/null
@@ -1,39 +0,0 @@
-assertDescription('a scalar', scalarValue());
- }
-
- public function testDecribesActualTypeInMismatchMessage()
- {
- $this->assertMismatchDescription('was null', scalarValue(), null);
- $this->assertMismatchDescription('was an array ["foo"]', scalarValue(), array('foo'));
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsStringTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsStringTest.php
deleted file mode 100644
index 557d5913a20..00000000000
--- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Type/IsStringTest.php
+++ /dev/null
@@ -1,35 +0,0 @@
-assertDescription('a string', stringValue());
- }
-
- public function testDecribesActualTypeInMismatchMessage()
- {
- $this->assertMismatchDescription('was null', stringValue(), null);
- $this->assertMismatchDescription('was a double <5.2F>', stringValue(), 5.2);
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/UtilTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/UtilTest.php
deleted file mode 100644
index 0c2cd043371..00000000000
--- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/UtilTest.php
+++ /dev/null
@@ -1,80 +0,0 @@
-assertSame($matcher, $newMatcher);
- }
-
- public function testWrapValueWithIsEqualWrapsPrimitive()
- {
- $matcher = \Hamcrest\Util::wrapValueWithIsEqual('foo');
- $this->assertInstanceOf('Hamcrest\Core\IsEqual', $matcher);
- $this->assertTrue($matcher->matches('foo'));
- }
-
- public function testCheckAllAreMatchersAcceptsMatchers()
- {
- \Hamcrest\Util::checkAllAreMatchers(array(
- new \Hamcrest\Text\MatchesPattern('/fo+/'),
- new \Hamcrest\Core\IsEqual('foo'),
- ));
- }
-
- /**
- * @expectedException InvalidArgumentException
- */
- public function testCheckAllAreMatchersFailsForPrimitive()
- {
- \Hamcrest\Util::checkAllAreMatchers(array(
- new \Hamcrest\Text\MatchesPattern('/fo+/'),
- 'foo',
- ));
- }
-
- private function callAndAssertCreateMatcherArray($items)
- {
- $matchers = \Hamcrest\Util::createMatcherArray($items);
- $this->assertInternalType('array', $matchers);
- $this->assertSameSize($items, $matchers);
- foreach ($matchers as $matcher) {
- $this->assertInstanceOf('\Hamcrest\Matcher', $matcher);
- }
-
- return $matchers;
- }
-
- public function testCreateMatcherArrayLeavesMatchersUntouched()
- {
- $matcher = new \Hamcrest\Text\MatchesPattern('/fo+/');
- $items = array($matcher);
- $matchers = $this->callAndAssertCreateMatcherArray($items);
- $this->assertSame($matcher, $matchers[0]);
- }
-
- public function testCreateMatcherArrayWrapsPrimitiveWithIsEqualMatcher()
- {
- $matchers = $this->callAndAssertCreateMatcherArray(array('foo'));
- $this->assertInstanceOf('Hamcrest\Core\IsEqual', $matchers[0]);
- $this->assertTrue($matchers[0]->matches('foo'));
- }
-
- public function testCreateMatcherArrayDoesntModifyOriginalArray()
- {
- $items = array('foo');
- $this->callAndAssertCreateMatcherArray($items);
- $this->assertSame('foo', $items[0]);
- }
-
- public function testCreateMatcherArrayUnwrapsSingleArrayElement()
- {
- $matchers = $this->callAndAssertCreateMatcherArray(array(array('foo')));
- $this->assertInstanceOf('Hamcrest\Core\IsEqual', $matchers[0]);
- $this->assertTrue($matchers[0]->matches('foo'));
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Xml/HasXPathTest.php b/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Xml/HasXPathTest.php
deleted file mode 100644
index 67748871608..00000000000
--- a/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Xml/HasXPathTest.php
+++ /dev/null
@@ -1,198 +0,0 @@
-
-
-
- alice
- Alice Frankel
- admin
-
-
- bob
- Bob Frankel
- user
-
-
- charlie
- Charlie Chan
- user
-
-
-XML;
- self::$doc = new \DOMDocument();
- self::$doc->loadXML(self::$xml);
-
- self::$html = <<
-
- Home Page
-
-
- Heading
- Some text
-
-
-HTML;
- }
-
- protected function createMatcher()
- {
- return \Hamcrest\Xml\HasXPath::hasXPath('/users/user');
- }
-
- public function testMatchesWhenXPathIsFound()
- {
- assertThat('one match', self::$doc, hasXPath('user[id = "bob"]'));
- assertThat('two matches', self::$doc, hasXPath('user[role = "user"]'));
- }
-
- public function testDoesNotMatchWhenXPathIsNotFound()
- {
- assertThat(
- 'no match',
- self::$doc,
- not(hasXPath('user[contains(id, "frank")]'))
- );
- }
-
- public function testMatchesWhenExpressionWithoutMatcherEvaluatesToTrue()
- {
- assertThat(
- 'one match',
- self::$doc,
- hasXPath('count(user[id = "bob"])')
- );
- }
-
- public function testDoesNotMatchWhenExpressionWithoutMatcherEvaluatesToFalse()
- {
- assertThat(
- 'no matches',
- self::$doc,
- not(hasXPath('count(user[id = "frank"])'))
- );
- }
-
- public function testMatchesWhenExpressionIsEqual()
- {
- assertThat(
- 'one match',
- self::$doc,
- hasXPath('count(user[id = "bob"])', 1)
- );
- assertThat(
- 'two matches',
- self::$doc,
- hasXPath('count(user[role = "user"])', 2)
- );
- }
-
- public function testDoesNotMatchWhenExpressionIsNotEqual()
- {
- assertThat(
- 'no match',
- self::$doc,
- not(hasXPath('count(user[id = "frank"])', 2))
- );
- assertThat(
- 'one match',
- self::$doc,
- not(hasXPath('count(user[role = "admin"])', 2))
- );
- }
-
- public function testMatchesWhenContentMatches()
- {
- assertThat(
- 'one match',
- self::$doc,
- hasXPath('user/name', containsString('ice'))
- );
- assertThat(
- 'two matches',
- self::$doc,
- hasXPath('user/role', equalTo('user'))
- );
- }
-
- public function testDoesNotMatchWhenContentDoesNotMatch()
- {
- assertThat(
- 'no match',
- self::$doc,
- not(hasXPath('user/name', containsString('Bobby')))
- );
- assertThat(
- 'no matches',
- self::$doc,
- not(hasXPath('user/role', equalTo('owner')))
- );
- }
-
- public function testProvidesConvenientShortcutForHasXPathEqualTo()
- {
- assertThat('matches', self::$doc, hasXPath('count(user)', 3));
- assertThat('matches', self::$doc, hasXPath('user[2]/id', 'bob'));
- }
-
- public function testProvidesConvenientShortcutForHasXPathCountEqualTo()
- {
- assertThat('matches', self::$doc, hasXPath('user[id = "charlie"]', 1));
- }
-
- public function testMatchesAcceptsXmlString()
- {
- assertThat('accepts XML string', self::$xml, hasXPath('user'));
- }
-
- public function testMatchesAcceptsHtmlString()
- {
- assertThat('accepts HTML string', self::$html, hasXPath('body/h1', 'Heading'));
- }
-
- public function testHasAReadableDescription()
- {
- $this->assertDescription(
- 'XML or HTML document with XPath "/users/user"',
- hasXPath('/users/user')
- );
- $this->assertDescription(
- 'XML or HTML document with XPath "count(/users/user)" <2>',
- hasXPath('/users/user', 2)
- );
- $this->assertDescription(
- 'XML or HTML document with XPath "/users/user/name"'
- . ' a string starting with "Alice"',
- hasXPath('/users/user/name', startsWith('Alice'))
- );
- }
-
- public function testHasAReadableMismatchDescription()
- {
- $this->assertMismatchDescription(
- 'XPath returned no results',
- hasXPath('/users/name'),
- self::$doc
- );
- $this->assertMismatchDescription(
- 'XPath expression result was <3F>',
- hasXPath('/users/user', 2),
- self::$doc
- );
- $this->assertMismatchDescription(
- 'XPath returned ["alice", "bob", "charlie"]',
- hasXPath('/users/user/id', 'Frank'),
- self::$doc
- );
- }
-}
diff --git a/vendor/hamcrest/hamcrest-php/tests/bootstrap.php b/vendor/hamcrest/hamcrest-php/tests/bootstrap.php
deleted file mode 100644
index 35a696cda21..00000000000
--- a/vendor/hamcrest/hamcrest-php/tests/bootstrap.php
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
- .
-
-
-
-
-
- ../hamcrest
-
-
-
diff --git a/vendor/mockery/mockery/.gitignore b/vendor/mockery/mockery/.gitignore
deleted file mode 100644
index 3b5e189cd41..00000000000
--- a/vendor/mockery/mockery/.gitignore
+++ /dev/null
@@ -1,12 +0,0 @@
-*~
-pearfarm.spec
-*.sublime-project
-library/Hamcrest/*
-composer.lock
-vendor/
-composer.phar
-test.php
-build/
-phpunit.xml
-*.DS_store
-.idea/*
diff --git a/vendor/mockery/mockery/.php_cs b/vendor/mockery/mockery/.php_cs
deleted file mode 100644
index 74df8bf756e..00000000000
--- a/vendor/mockery/mockery/.php_cs
+++ /dev/null
@@ -1,14 +0,0 @@
-exclude('examples')
- ->exclude('docs')
- ->exclude('travis')
- ->exclude('vendor')
- ->exclude('tests/Mockery/_files')
- ->exclude('tests/Mockery/_files')
- ->in(__DIR__);
-
-return Symfony\CS\Config\Config::create()
- ->level('psr2')
- ->finder($finder);
\ No newline at end of file
diff --git a/vendor/mockery/mockery/.scrutinizer.yml b/vendor/mockery/mockery/.scrutinizer.yml
deleted file mode 100644
index 3b633cc3369..00000000000
--- a/vendor/mockery/mockery/.scrutinizer.yml
+++ /dev/null
@@ -1,24 +0,0 @@
-filter:
- paths: [library/*]
- excluded_paths: [vendor/*, tests/*, examples/*]
-before_commands:
- - 'composer install --dev --prefer-source'
-tools:
- external_code_coverage:
- timeout: 300
- php_code_sniffer: true
- php_cpd:
- enabled: true
- excluded_dirs: [vendor, tests, examples]
- php_pdepend:
- enabled: true
- excluded_dirs: [vendor, tests, examples]
- php_loc:
- enabled: true
- excluded_dirs: [vendor, tests, examples]
- php_hhvm: false
- php_mess_detector: true
- php_analyzer: true
-changetracking:
- bug_patterns: ["\bfix(?:es|ed)?\b"]
- feature_patterns: ["\badd(?:s|ed)?\b", "\bimplement(?:s|ed)?\b"]
diff --git a/vendor/mockery/mockery/.styleci.yml b/vendor/mockery/mockery/.styleci.yml
deleted file mode 100644
index f6c002f9d46..00000000000
--- a/vendor/mockery/mockery/.styleci.yml
+++ /dev/null
@@ -1 +0,0 @@
-preset: psr2
diff --git a/vendor/mockery/mockery/.travis.yml b/vendor/mockery/mockery/.travis.yml
deleted file mode 100644
index 637b4d0c3a4..00000000000
--- a/vendor/mockery/mockery/.travis.yml
+++ /dev/null
@@ -1,42 +0,0 @@
-language: php
-
-php:
- - 5.3
- - 5.4
- - 5.5
- - 5.6
- - 7.0
- - hhvm
- - hhvm-nightly
-
-matrix:
- allow_failures:
- - php: hhvm
- - php: hhvm-nightly
-
-sudo: false
-
-cache:
- directories:
- - $HOME/.composer/cache
-
-before_install:
- - composer self-update
-
-install:
- - travis_retry ./travis/install.sh
-
-before_script:
- - ./travis/before_script.sh
-
-script:
- - ./travis/script.sh
-
-after_success:
- - ./travis/after_success.sh
-
-notifications:
- email:
- - padraic.brady@gmail.com
- - dave@atstsolutions.co.uk
- irc: "irc.freenode.org#mockery"
diff --git a/vendor/mockery/mockery/CHANGELOG.md b/vendor/mockery/mockery/CHANGELOG.md
deleted file mode 100644
index 2a216dc4736..00000000000
--- a/vendor/mockery/mockery/CHANGELOG.md
+++ /dev/null
@@ -1,44 +0,0 @@
-# Change Log
-
-## 0.9.4 (XXXX-XX-XX)
-
-* `shouldIgnoreMissing` will respect global `allowMockingNonExistentMethods`
- config
-* Some support for variadic parameters
-* Hamcrest is now a required dependency
-* Instance mocks now respect `shouldIgnoreMissing` call on control instance
-* This will be the *last version to support PHP 5.3*
-* Added `Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration` trait
-* Added `makePartial` to `Mockery\MockInterface` as it was missing
-
-## 0.9.3 (2014-12-22)
-
-* Added a basic spy implementation
-* Added `Mockery\Adapter\Phpunit\MockeryTestCase` for more reliable PHPUnit
- integration
-
-## 0.9.2 (2014-09-03)
-
-* Some workarounds for the serilisation problems created by changes to PHP in 5.5.13, 5.4.29,
- 5.6.
-* Demeter chains attempt to reuse doubles as they see fit, so for foo->bar and
- foo->baz, we'll attempt to use the same foo
-
-## 0.9.1 (2014-05-02)
-
-* Allow specifying consecutive exceptions to be thrown with `andThrowExceptions`
-* Allow specifying methods which can be mocked when using
- `Mockery\Configuration::allowMockingNonExistentMethods(false)` with
- `Mockery\MockInterface::shouldAllowMockingMethod($methodName)`
-* Added andReturnSelf method: `$mock->shouldReceive("foo")->andReturnSelf()`
-* `shouldIgnoreMissing` now takes an optional value that will be return instead
- of null, e.g. `$mock->shouldIgnoreMissing($mock)`
-
-## 0.9.0 (2014-02-05)
-
-* Allow mocking classes with final __wakeup() method
-* Quick definitions are now always `byDefault`
-* Allow mocking of protected methods with `shouldAllowMockingProtectedMethods`
-* Support official Hamcrest package
-* Generator completely rewritten
-* Easily create named mocks with namedMock
diff --git a/vendor/mockery/mockery/CONTRIBUTING.md b/vendor/mockery/mockery/CONTRIBUTING.md
deleted file mode 100644
index 9ceb6657265..00000000000
--- a/vendor/mockery/mockery/CONTRIBUTING.md
+++ /dev/null
@@ -1,89 +0,0 @@
-# Contributing
-
-
-We'd love you to help out with mockery and no contribution is too small.
-
-
-## Reporting Bugs
-
-Issues can be reported on the [issue
-tracker](https://github.com/padraic/mockery/issues). Please try and report any
-bugs with a minimal reproducible example, it will make things easier for other
-contributors and your problems will hopefully be resolved quickly.
-
-
-## Requesting Features
-
-We're always interested to hear about your ideas and you can request features by
-creating a ticket in the [issue
-tracker](https://github.com/padraic/mockery/issues). We can't always guarantee
-someone will jump on it straight away, but putting it out there to see if anyone
-else is interested is a good idea.
-
-Likewise, if a feature you would like is already listed in
-the issue tracker, add a :+1: so that other contributors know it's a feature
-that would help others.
-
-
-## Contributing code and documentation
-
-We loosely follow the
-[PSR-1](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-1-basic-coding-standard.md)
-and
-[PSR-2](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md) coding standards,
-but we'll probably merge any code that looks close enough.
-
-* Fork the [repository](https://github.com/padraic/mockery) on GitHub
-* Add the code for your feature or bug
-* Add some tests for your feature or bug
-* Optionally, but preferably, write some documentation
-* Optionally, update the CHANGELOG.md file with your feature or
- [BC](http://en.wikipedia.org/wiki/Backward_compatibility) break
-* If you have created new library files, add them to the root package.xml file for PEAR install support.
-* Send a [Pull
- Request](https://help.github.com/articles/creating-a-pull-request) to the
- correct target branch (see below)
-
-If you have a big change or would like to discuss something, create an issue in
-the [issue tracker](https://github.com/padraic/mockery/issues) or jump in to
-\#mockery on freenode
-
-
-Any code you contribute must be licensed under the [BSD 3-Clause
-License](http://opensource.org/licenses/BSD-3-Clause).
-
-
-## Target Branch
-
-Mockery may have several active branches at any one time and roughly follows a
-[Git Branching Model](https://igor.io/2013/10/21/git-branching-model.html).
-Generally, if you're developing a new feature, you want to be targeting the
-master branch, if it's a bug fix, you want to be targeting a release branch,
-e.g. 0.8.
-
-
-## Testing Mockery
-
-To run the unit tests for Mockery, clone the git repository, download Composer using
-the instructions at [http://getcomposer.org/download/](http://getcomposer.org/download/),
-then install the dependencies with `php /path/to/composer.phar install --dev`.
-
-This will install the required PHPUnit and Hamcrest dev dependencies and create the
-autoload files required by the unit tests. You may run the `vendor/bin/phpunit` command
-to run the unit tests. If everything goes to plan, there will be no failed tests!
-
-
-## Debugging Mockery
-
-Mockery and it's code generation can be difficult to debug. A good start is to
-use the `RequireLoader`, which will dump the code generated by mockery to a file
-before requiring it, rather than using eval. This will help with stack traces,
-and you will be able to open the mock class in your editor.
-
-``` php
-
-// tests/bootstrap.php
-
-Mockery::setLoader(new Mockery\Loader\RequireLoader(sys_get_temp_dir()));
-
-```
diff --git a/vendor/mockery/mockery/LICENSE b/vendor/mockery/mockery/LICENSE
deleted file mode 100644
index 2ca3b0640b6..00000000000
--- a/vendor/mockery/mockery/LICENSE
+++ /dev/null
@@ -1,27 +0,0 @@
-Copyright (c) 2010-2014, Pádraic Brady
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- * Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- * The name of Pádraic Brady may not be used to endorse or promote
- products derived from this software without specific prior written
- permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/vendor/mockery/mockery/README.md b/vendor/mockery/mockery/README.md
deleted file mode 100644
index 9483ff1cbef..00000000000
--- a/vendor/mockery/mockery/README.md
+++ /dev/null
@@ -1,68 +0,0 @@
-Mockery
-=======
-
-[![Build Status](https://travis-ci.org/padraic/mockery.png?branch=master)](http://travis-ci.org/padraic/mockery)
-[![Latest Stable Version](https://poser.pugx.org/mockery/mockery/v/stable.png)](https://packagist.org/packages/mockery/mockery)
-[![Total Downloads](https://poser.pugx.org/mockery/mockery/downloads.png)](https://packagist.org/packages/mockery/mockery)
-
-
-Mockery is a simple yet flexible PHP mock object framework for use in unit testing
-with PHPUnit, PHPSpec or any other testing framework. Its core goal is to offer a
-test double framework with a succinct API capable of clearly defining all possible
-object operations and interactions using a human readable Domain Specific Language
-(DSL). Designed as a drop in alternative to PHPUnit's phpunit-mock-objects library,
-Mockery is easy to integrate with PHPUnit and can operate alongside
-phpunit-mock-objects without the World ending.
-
-Mockery is released under a New BSD License.
-
-The current released version on Packagist is 0.9.3.
-The current released version for PEAR is 0.9.0. Composer users may instead opt to use
-the current master branch aliased to 0.9.x-dev.
-
-## Installation
-
-To install Mockery, run the command below and you will get the latest
-version
-
-```sh
-composer require mockery/mockery
-```
-
-If you want to run the tests:
-
-```sh
-vendor/bin/phpunit
-```
-
-####Note
-
-The future Mockery 0.9.4 release will be the final version to have PHP 5.3
-as a minimum requirement. The minimum PHP requirement will thereafter move to
-PHP 5.4. Also, the PEAR channel will go offline permanently no earlier than 30
-June 2015.
-
-## Mock Objects
-
-In unit tests, mock objects simulate the behaviour of real objects. They are
-commonly utilised to offer test isolation, to stand in for objects which do not
-yet exist, or to allow for the exploratory design of class APIs without
-requiring actual implementation up front.
-
-The benefits of a mock object framework are to allow for the flexible generation
-of such mock objects (and stubs). They allow the setting of expected method calls
-and return values using a flexible API which is capable of capturing every
-possible real object behaviour in way that is stated as close as possible to a
-natural language description.
-
-
-## Prerequisites
-
-Mockery requires PHP 5.3.2 or greater. In addition, it is recommended to install
-the Hamcrest library (see below for instructions) which contains additional
-matchers used when defining expected method arguments.
-
-
-## Documentation
-
-The current version can be seen at [docs.mockery.io](http://docs.mockery.io).
diff --git a/vendor/mockery/mockery/composer.json b/vendor/mockery/mockery/composer.json
deleted file mode 100644
index d538f0d246a..00000000000
--- a/vendor/mockery/mockery/composer.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- "name": "mockery/mockery",
- "description": "Mockery is a simple yet flexible PHP mock object framework for use in unit testing with PHPUnit, PHPSpec or any other testing framework. Its core goal is to offer a test double framework with a succinct API capable of clearly defining all possible object operations and interactions using a human readable Domain Specific Language (DSL). Designed as a drop in alternative to PHPUnit's phpunit-mock-objects library, Mockery is easy to integrate with PHPUnit and can operate alongside phpunit-mock-objects without the World ending.",
- "keywords": ["library", "testing", "test", "stub", "mock", "mockery", "test double", "tdd", "bdd", "mock objects"],
- "homepage": "http://github.com/padraic/mockery",
- "license": "BSD-3-Clause",
- "authors": [
- {
- "name": "Pádraic Brady",
- "email": "padraic.brady@gmail.com",
- "homepage": "http://blog.astrumfutura.com"
- },
- {
- "name": "Dave Marshall",
- "email": "dave.marshall@atstsolutions.co.uk",
- "homepage": "http://davedevelopment.co.uk"
- }
- ],
- "require": {
- "php": ">=5.3.2",
- "lib-pcre": ">=7.0",
- "hamcrest/hamcrest-php": "~1.1"
- },
- "require-dev": {
- "phpunit/phpunit": "~4.0"
- },
- "autoload": {
- "psr-0": { "Mockery": "library/" }
- },
- "extra": {
- "branch-alias": {
- "dev-master": "0.9.x-dev"
- }
- }
-}
diff --git a/vendor/mockery/mockery/docs/.gitignore b/vendor/mockery/mockery/docs/.gitignore
deleted file mode 100644
index e35d8850c96..00000000000
--- a/vendor/mockery/mockery/docs/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-_build
diff --git a/vendor/mockery/mockery/docs/Makefile b/vendor/mockery/mockery/docs/Makefile
deleted file mode 100644
index 9a8c94087c1..00000000000
--- a/vendor/mockery/mockery/docs/Makefile
+++ /dev/null
@@ -1,177 +0,0 @@
-# Makefile for Sphinx documentation
-#
-
-# You can set these variables from the command line.
-SPHINXOPTS =
-SPHINXBUILD = sphinx-build
-PAPER =
-BUILDDIR = _build
-
-# User-friendly check for sphinx-build
-ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
-$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
-endif
-
-# Internal variables.
-PAPEROPT_a4 = -D latex_paper_size=a4
-PAPEROPT_letter = -D latex_paper_size=letter
-ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
-# the i18n builder cannot share the environment and doctrees with the others
-I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
-
-.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
-
-help:
- @echo "Please use \`make ' where is one of"
- @echo " html to make standalone HTML files"
- @echo " dirhtml to make HTML files named index.html in directories"
- @echo " singlehtml to make a single large HTML file"
- @echo " pickle to make pickle files"
- @echo " json to make JSON files"
- @echo " htmlhelp to make HTML files and a HTML help project"
- @echo " qthelp to make HTML files and a qthelp project"
- @echo " devhelp to make HTML files and a Devhelp project"
- @echo " epub to make an epub"
- @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
- @echo " latexpdf to make LaTeX files and run them through pdflatex"
- @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
- @echo " text to make text files"
- @echo " man to make manual pages"
- @echo " texinfo to make Texinfo files"
- @echo " info to make Texinfo files and run them through makeinfo"
- @echo " gettext to make PO message catalogs"
- @echo " changes to make an overview of all changed/added/deprecated items"
- @echo " xml to make Docutils-native XML files"
- @echo " pseudoxml to make pseudoxml-XML files for display purposes"
- @echo " linkcheck to check all external links for integrity"
- @echo " doctest to run all doctests embedded in the documentation (if enabled)"
-
-clean:
- rm -rf $(BUILDDIR)/*
-
-html:
- $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
- @echo
- @echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
-
-dirhtml:
- $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
- @echo
- @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
-
-singlehtml:
- $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
- @echo
- @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
-
-pickle:
- $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
- @echo
- @echo "Build finished; now you can process the pickle files."
-
-json:
- $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
- @echo
- @echo "Build finished; now you can process the JSON files."
-
-htmlhelp:
- $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
- @echo
- @echo "Build finished; now you can run HTML Help Workshop with the" \
- ".hhp project file in $(BUILDDIR)/htmlhelp."
-
-qthelp:
- $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
- @echo
- @echo "Build finished; now you can run "qcollectiongenerator" with the" \
- ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
- @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/MockeryDocs.qhcp"
- @echo "To view the help file:"
- @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/MockeryDocs.qhc"
-
-devhelp:
- $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
- @echo
- @echo "Build finished."
- @echo "To view the help file:"
- @echo "# mkdir -p $$HOME/.local/share/devhelp/MockeryDocs"
- @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/MockeryDocs"
- @echo "# devhelp"
-
-epub:
- $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
- @echo
- @echo "Build finished. The epub file is in $(BUILDDIR)/epub."
-
-latex:
- $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
- @echo
- @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
- @echo "Run \`make' in that directory to run these through (pdf)latex" \
- "(use \`make latexpdf' here to do that automatically)."
-
-latexpdf:
- $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
- @echo "Running LaTeX files through pdflatex..."
- $(MAKE) -C $(BUILDDIR)/latex all-pdf
- @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
-
-latexpdfja:
- $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
- @echo "Running LaTeX files through platex and dvipdfmx..."
- $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
- @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
-
-text:
- $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
- @echo
- @echo "Build finished. The text files are in $(BUILDDIR)/text."
-
-man:
- $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
- @echo
- @echo "Build finished. The manual pages are in $(BUILDDIR)/man."
-
-texinfo:
- $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
- @echo
- @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
- @echo "Run \`make' in that directory to run these through makeinfo" \
- "(use \`make info' here to do that automatically)."
-
-info:
- $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
- @echo "Running Texinfo files through makeinfo..."
- make -C $(BUILDDIR)/texinfo info
- @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
-
-gettext:
- $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
- @echo
- @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
-
-changes:
- $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
- @echo
- @echo "The overview file is in $(BUILDDIR)/changes."
-
-linkcheck:
- $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
- @echo
- @echo "Link check complete; look for any errors in the above output " \
- "or in $(BUILDDIR)/linkcheck/output.txt."
-
-doctest:
- $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
- @echo "Testing of doctests in the sources finished, look at the " \
- "results in $(BUILDDIR)/doctest/output.txt."
-
-xml:
- $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
- @echo
- @echo "Build finished. The XML files are in $(BUILDDIR)/xml."
-
-pseudoxml:
- $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
- @echo
- @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
diff --git a/vendor/mockery/mockery/docs/README.md b/vendor/mockery/mockery/docs/README.md
deleted file mode 100644
index 63ca69db7ea..00000000000
--- a/vendor/mockery/mockery/docs/README.md
+++ /dev/null
@@ -1,4 +0,0 @@
-mockery-docs
-============
-
-Document for the PHP Mockery framework on readthedocs.org
\ No newline at end of file
diff --git a/vendor/mockery/mockery/docs/conf.py b/vendor/mockery/mockery/docs/conf.py
deleted file mode 100644
index 088cdcc21aa..00000000000
--- a/vendor/mockery/mockery/docs/conf.py
+++ /dev/null
@@ -1,259 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Mockery Docs documentation build configuration file, created by
-# sphinx-quickstart on Mon Mar 3 14:04:26 2014.
-#
-# This file is execfile()d with the current directory set to its
-# containing dir.
-#
-# Note that not all possible configuration values are present in this
-# autogenerated file.
-#
-# All configuration values have a default; values that are commented out
-# serve to show the default.
-
-import sys
-import os
-
-# If extensions (or modules to document with autodoc) are in another directory,
-# add these directories to sys.path here. If the directory is relative to the
-# documentation root, use os.path.abspath to make it absolute, like shown here.
-#sys.path.insert(0, os.path.abspath('.'))
-
-# -- General configuration ------------------------------------------------
-
-# If your documentation needs a minimal Sphinx version, state it here.
-#needs_sphinx = '1.0'
-
-# Add any Sphinx extension module names here, as strings. They can be
-# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
-# ones.
-extensions = [
- 'sphinx.ext.todo',
-]
-
-# Add any paths that contain templates here, relative to this directory.
-templates_path = ['_templates']
-
-# The suffix of source filenames.
-source_suffix = '.rst'
-
-# The encoding of source files.
-#source_encoding = 'utf-8-sig'
-
-# The master toctree document.
-master_doc = 'index'
-
-# General information about the project.
-project = u'Mockery Docs'
-copyright = u'2014, Pádraic Brady, Dave Marshall, Wouter, Graham Campbell'
-
-# The version info for the project you're documenting, acts as replacement for
-# |version| and |release|, also used in various other places throughout the
-# built documents.
-#
-# The short X.Y version.
-version = '0.9'
-# The full version, including alpha/beta/rc tags.
-release = '0.9'
-
-# The language for content autogenerated by Sphinx. Refer to documentation
-# for a list of supported languages.
-#language = None
-
-# There are two options for replacing |today|: either, you set today to some
-# non-false value, then it is used:
-#today = ''
-# Else, today_fmt is used as the format for a strftime call.
-#today_fmt = '%B %d, %Y'
-
-# List of patterns, relative to source directory, that match files and
-# directories to ignore when looking for source files.
-exclude_patterns = ['_build']
-
-# The reST default role (used for this markup: `text`) to use for all
-# documents.
-#default_role = None
-
-# If true, '()' will be appended to :func: etc. cross-reference text.
-#add_function_parentheses = True
-
-# If true, the current module name will be prepended to all description
-# unit titles (such as .. function::).
-#add_module_names = True
-
-# If true, sectionauthor and moduleauthor directives will be shown in the
-# output. They are ignored by default.
-#show_authors = False
-
-# The name of the Pygments (syntax highlighting) style to use.
-pygments_style = 'sphinx'
-
-# A list of ignored prefixes for module index sorting.
-#modindex_common_prefix = []
-
-# If true, keep warnings as "system message" paragraphs in the built documents.
-#keep_warnings = False
-
-
-# -- Options for HTML output ----------------------------------------------
-
-# The theme to use for HTML and HTML Help pages. See the documentation for
-# a list of builtin themes.
-html_theme = 'default'
-
-# Theme options are theme-specific and customize the look and feel of a theme
-# further. For a list of options available for each theme, see the
-# documentation.
-#html_theme_options = {}
-
-# Add any paths that contain custom themes here, relative to this directory.
-#html_theme_path = []
-
-# The name of an image file (within the static path) to use as favicon of the
-# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
-# pixels large.
-#html_favicon = None
-
-# Add any paths that contain custom static files (such as style sheets) here,
-# relative to this directory. They are copied after the builtin static files,
-# so a file named "default.css" will overwrite the builtin "default.css".
-html_static_path = ['_static']
-
-# Add any extra paths that contain custom files (such as robots.txt or
-# .htaccess) here, relative to this directory. These files are copied
-# directly to the root of the documentation.
-#html_extra_path = []
-
-# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
-# using the given strftime format.
-#html_last_updated_fmt = '%b %d, %Y'
-
-# If true, SmartyPants will be used to convert quotes and dashes to
-# typographically correct entities.
-#html_use_smartypants = True
-
-# Custom sidebar templates, maps document names to template names.
-#html_sidebars = {}
-
-# Additional templates that should be rendered to pages, maps page names to
-# template names.
-#html_additional_pages = {}
-
-# If false, no module index is generated.
-#html_domain_indices = True
-
-# If false, no index is generated.
-#html_use_index = True
-
-# If true, the index is split into individual pages for each letter.
-#html_split_index = False
-
-# If true, links to the reST sources are added to the pages.
-#html_show_sourcelink = True
-
-# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
-#html_show_sphinx = True
-
-# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
-#html_show_copyright = True
-
-# If true, an OpenSearch description file will be output, and all pages will
-# contain a tag referring to it. The value of this option must be the
-# base URL from which the finished HTML is served.
-#html_use_opensearch = ''
-
-# This is the file name suffix for HTML files (e.g. ".xhtml").
-#html_file_suffix = None
-
-# Output file base name for HTML help builder.
-htmlhelp_basename = 'MockeryDocsdoc'
-
-
-# -- Options for LaTeX output ---------------------------------------------
-
-latex_elements = {
-# The paper size ('letterpaper' or 'a4paper').
-#'papersize': 'letterpaper',
-
-# The font size ('10pt', '11pt' or '12pt').
-#'pointsize': '10pt',
-
-# Additional stuff for the LaTeX preamble.
-#'preamble': '',
-}
-
-# Grouping the document tree into LaTeX files. List of tuples
-# (source start file, target name, title,
-# author, documentclass [howto, manual, or own class]).
-latex_documents = [
- ('index2', 'MockeryDocs.tex', u'Mockery Docs Documentation',
- u'Pádraic Brady, Dave Marshall, Wouter, Graham Campbell', 'manual'),
-]
-
-# The name of an image file (relative to this directory) to place at the top of
-# the title page.
-#latex_logo = None
-
-# For "manual" documents, if this is true, then toplevel headings are parts,
-# not chapters.
-#latex_use_parts = False
-
-# If true, show page references after internal links.
-#latex_show_pagerefs = False
-
-# If true, show URL addresses after external links.
-#latex_show_urls = False
-
-# Documents to append as an appendix to all manuals.
-#latex_appendices = []
-
-# If false, no module index is generated.
-#latex_domain_indices = True
-
-
-# -- Options for manual page output ---------------------------------------
-
-# One entry per manual page. List of tuples
-# (source start file, name, description, authors, manual section).
-man_pages = [
- ('index2', 'mockerydocs', u'Mockery Docs Documentation',
- [u'Pádraic Brady, Dave Marshall, Wouter, Graham Campbell'], 1)
-]
-
-# If true, show URL addresses after external links.
-#man_show_urls = False
-
-
-# -- Options for Texinfo output -------------------------------------------
-
-# Grouping the document tree into Texinfo files. List of tuples
-# (source start file, target name, title, author,
-# dir menu entry, description, category)
-texinfo_documents = [
- ('index2', 'MockeryDocs', u'Mockery Docs Documentation',
- u'Pádraic Brady, Dave Marshall, Wouter, Graham Campbell', 'MockeryDocs', 'One line description of project.',
- 'Miscellaneous'),
-]
-
-# Documents to append as an appendix to all manuals.
-#texinfo_appendices = []
-
-# If false, no module index is generated.
-#texinfo_domain_indices = True
-
-# How to display URL addresses: 'footnote', 'no', or 'inline'.
-#texinfo_show_urls = 'footnote'
-
-# If true, do not generate a @detailmenu in the "Top" node's menu.
-#texinfo_no_detailmenu = False
-
-
-#on_rtd is whether we are on readthedocs.org, this line of code grabbed from docs.readthedocs.org
-on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
-
-if not on_rtd: # only import and set the theme if we're building docs locally
- import sphinx_rtd_theme
- html_theme = 'sphinx_rtd_theme'
- html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
- print sphinx_rtd_theme.get_html_theme_path()
diff --git a/vendor/mockery/mockery/docs/cookbook/default_expectations.rst b/vendor/mockery/mockery/docs/cookbook/default_expectations.rst
deleted file mode 100644
index 2c6fcae23d7..00000000000
--- a/vendor/mockery/mockery/docs/cookbook/default_expectations.rst
+++ /dev/null
@@ -1,17 +0,0 @@
-.. index::
- single: Cookbook; Default Mock Expectations
-
-Default Mock Expectations
-=========================
-
-Often in unit testing, we end up with sets of tests which use the same object
-dependency over and over again. Rather than mocking this class/object within
-every single unit test (requiring a mountain of duplicate code), we can
-instead define reusable default mocks within the test case's ``setup()``
-method. This even works where unit tests use varying expectations on the same
-or similar mock object.
-
-How this works, is that you can define mocks with default expectations. Then,
-in a later unit test, you can add or fine-tune expectations for that specific
-test. Any expectation can be set as a default using the ``byDefault()``
-declaration.
diff --git a/vendor/mockery/mockery/docs/cookbook/detecting_mock_objects.rst b/vendor/mockery/mockery/docs/cookbook/detecting_mock_objects.rst
deleted file mode 100644
index 0210c692be9..00000000000
--- a/vendor/mockery/mockery/docs/cookbook/detecting_mock_objects.rst
+++ /dev/null
@@ -1,13 +0,0 @@
-.. index::
- single: Cookbook; Detecting Mock Objects
-
-Detecting Mock Objects
-======================
-
-Users may find it useful to check whether a given object is a real object or a
-simulated Mock Object. All Mockery mocks implement the
-``\Mockery\MockInterface`` interface which can be used in a type check.
-
-.. code-block:: php
-
- assert($mightBeMocked instanceof \Mockery\MockInterface);
diff --git a/vendor/mockery/mockery/docs/cookbook/index.rst b/vendor/mockery/mockery/docs/cookbook/index.rst
deleted file mode 100644
index a1fc36f9631..00000000000
--- a/vendor/mockery/mockery/docs/cookbook/index.rst
+++ /dev/null
@@ -1,11 +0,0 @@
-Cookbook
-========
-
-.. toctree::
- :hidden:
-
- default_expectations
- detecting_mock_objects
- mocking_hard_dependencies
-
-.. include:: map.rst.inc
diff --git a/vendor/mockery/mockery/docs/cookbook/map.rst.inc b/vendor/mockery/mockery/docs/cookbook/map.rst.inc
deleted file mode 100644
index e128f80d033..00000000000
--- a/vendor/mockery/mockery/docs/cookbook/map.rst.inc
+++ /dev/null
@@ -1,3 +0,0 @@
-* :doc:`/cookbook/default_expectations`
-* :doc:`/cookbook/detecting_mock_objects`
-* :doc:`/cookbook/mocking_hard_dependencies`
diff --git a/vendor/mockery/mockery/docs/cookbook/mocking_hard_dependencies.rst b/vendor/mockery/mockery/docs/cookbook/mocking_hard_dependencies.rst
deleted file mode 100644
index 6d62719785f..00000000000
--- a/vendor/mockery/mockery/docs/cookbook/mocking_hard_dependencies.rst
+++ /dev/null
@@ -1,93 +0,0 @@
-.. index::
- single: Cookbook; Mocking Hard Dependencies
-
-Mocking Hard Dependencies (new Keyword)
-=======================================
-
-One prerequisite to mock hard dependencies is that the code we are trying to test uses autoloading.
-
-Let's take the following code for an example:
-
-.. code-block:: php
-
- sendSomething($param);
- return $externalService->getSomething();
- }
- }
-
-The way we can test this without doing any changes to the code itself is by creating :doc:`instance mocks ` by using the ``overload`` prefix.
-
-.. code-block:: php
-
- shouldReceive('sendSomething')
- ->once()
- ->with($param);
- $externalMock->shouldReceive('getSomething')
- ->once()
- ->andReturn('Tested!');
-
- $service = new \App\Service();
-
- $result = $service->callExternalService($param);
-
- $this->assertSame('Tested!', $result);
- }
- }
-
-If we run this test now, it should pass. Mockery does its job and our ``App\Service`` will use the mocked external service instead of the real one.
-
-The problem with this is when we want to, for example, test the ``App\Service\External`` itself, or if we use that class somewhere else in our tests.
-
-When Mockery overloads a class, because of how PHP works with files, that overloaded class file must not be included otherwise Mockery will throw a "class already exists" exception. This is where autoloading kicks in and makes our job a lot easier.
-
-To make this possible, we'll tell PHPUnit to run the tests that have overloaded classes in separate processes and to not preserve global state. That way we'll avoid having the overloaded class included more than once. Of course this has its downsides as these tests will run slower.
-
-Our test example from above now becomes:
-
-.. code-block:: php
-
- shouldReceive('sendSomething')
- ->once()
- ->with($param);
- $externalMock->shouldReceive('getSomething')
- ->once()
- ->andReturn('Tested!');
-
- $service = new \App\Service();
-
- $result = $service->callExternalService($param);
-
- $this->assertSame('Tested!', $result);
- }
- }
diff --git a/vendor/mockery/mockery/docs/getting_started/index.rst b/vendor/mockery/mockery/docs/getting_started/index.rst
deleted file mode 100644
index df30ee2b750..00000000000
--- a/vendor/mockery/mockery/docs/getting_started/index.rst
+++ /dev/null
@@ -1,11 +0,0 @@
-Getting Started
-===============
-
-.. toctree::
- :hidden:
-
- installation
- upgrading
- simple_example
-
-.. include:: map.rst.inc
diff --git a/vendor/mockery/mockery/docs/getting_started/installation.rst b/vendor/mockery/mockery/docs/getting_started/installation.rst
deleted file mode 100644
index 46a27833cd2..00000000000
--- a/vendor/mockery/mockery/docs/getting_started/installation.rst
+++ /dev/null
@@ -1,68 +0,0 @@
-.. index::
- single: Installation
-
-Installation
-============
-
-Mockery can be installed using Composer, PEAR or by cloning it from its GitHub
-repository. These three options are outlined below.
-
-Composer
---------
-
-You can read more about Composer on `getcomposer.org `_.
-To install Mockery using Composer, first install Composer for your project
-using the instructions on the `Composer download page `_.
-You can then define your development dependency on Mockery using the suggested
-parameters below. While every effort is made to keep the master branch stable,
-you may prefer to use the current stable version tag instead (use the
-``@stable`` tag).
-
-.. code-block:: json
-
- {
- "require-dev": {
- "mockery/mockery": "dev-master"
- }
- }
-
-To install, you then may call:
-
-.. code-block:: bash
-
- php composer.phar update
-
-This will install Mockery as a development dependency, meaning it won't be
-installed when using ``php composer.phar update --no-dev`` in production.
-
-PEAR
-----
-
-Mockery is hosted on the `survivethedeepend.com `_
-PEAR channel and can be installed using the following commands:
-
-.. code-block:: bash
-
- sudo pear channel-discover pear.survivethedeepend.com
- sudo pear channel-discover hamcrest.googlecode.com/svn/pear
- sudo pear install --alldeps deepend/Mockery
-
-Git
----
-
-The Git repository hosts the development version in its master branch. You can
-install this using Composer by referencing ``dev-master`` as your preferred
-version in your project's ``composer.json`` file as the earlier example shows.
-
-You may also install this development version using PEAR:
-
-.. code-block:: bash
-
- git clone git://github.com/padraic/mockery.git
- cd mockery
- sudo pear channel-discover hamcrest.googlecode.com/svn/pear
- sudo pear install --alldeps package.xml
-
-The above processes will install both Mockery and Hamcrest. While omitting
-Hamcrest will not break Mockery, Hamcrest is recommended as it adds a wider
-variety of functionality for argument matching.
diff --git a/vendor/mockery/mockery/docs/getting_started/map.rst.inc b/vendor/mockery/mockery/docs/getting_started/map.rst.inc
deleted file mode 100644
index 9a1dbc874b5..00000000000
--- a/vendor/mockery/mockery/docs/getting_started/map.rst.inc
+++ /dev/null
@@ -1,3 +0,0 @@
-* :doc:`/getting_started/installation`
-* :doc:`/getting_started/upgrading`
-* :doc:`/getting_started/simple_example`
diff --git a/vendor/mockery/mockery/docs/getting_started/simple_example.rst b/vendor/mockery/mockery/docs/getting_started/simple_example.rst
deleted file mode 100644
index d150dd83b61..00000000000
--- a/vendor/mockery/mockery/docs/getting_started/simple_example.rst
+++ /dev/null
@@ -1,66 +0,0 @@
-.. index::
- single: Getting Started; Simple Example
-
-Simple Example
-==============
-
-Imagine we have a ``Temperature`` class which samples the temperature of a
-locale before reporting an average temperature. The data could come from a web
-service or any other data source, but we do not have such a class at present.
-We can, however, assume some basic interactions with such a class based on its
-interaction with the ``Temperature`` class:
-
-.. code-block:: php
-
- class Temperature
- {
-
- public function __construct($service)
- {
- $this->_service = $service;
- }
-
- public function average()
- {
- $total = 0;
- for ($i=0;$i<3;$i++) {
- $total += $this->_service->readTemp();
- }
- return $total/3;
- }
-
- }
-
-Even without an actual service class, we can see how we expect it to operate.
-When writing a test for the ``Temperature`` class, we can now substitute a
-mock object for the real service which allows us to test the behaviour of the
-``Temperature`` class without actually needing a concrete service instance.
-
-.. code-block:: php
-
- use \Mockery as m;
-
- class TemperatureTest extends PHPUnit_Framework_TestCase
- {
-
- public function tearDown()
- {
- m::close();
- }
-
- public function testGetsAverageTemperatureFromThreeServiceReadings()
- {
- $service = m::mock('service');
- $service->shouldReceive('readTemp')->times(3)->andReturn(10, 12, 14);
-
- $temperature = new Temperature($service);
-
- $this->assertEquals(12, $temperature->average());
- }
-
- }
-
-.. note::
-
- PHPUnit integration can remove the need for a ``tearDown()`` method. See
- ":doc:`/reference/phpunit_integration`" for more information.
diff --git a/vendor/mockery/mockery/docs/getting_started/upgrading.rst b/vendor/mockery/mockery/docs/getting_started/upgrading.rst
deleted file mode 100644
index d8cd291d34e..00000000000
--- a/vendor/mockery/mockery/docs/getting_started/upgrading.rst
+++ /dev/null
@@ -1,26 +0,0 @@
-.. index::
- single: Upgrading
-
-Upgrading
-=========
-
-Upgrading to 0.9
-----------------
-
-The generator was completely rewritten, so any code with a deep integration to
-mockery will need evaluating
-
-Upgrading to 0.8
-----------------
-
-Since the release of 0.8.0 the following behaviours were altered:
-
-1. The ``shouldIgnoreMissing()`` behaviour optionally applied to mock objects
- returned an instance of ``\Mockery\Undefined`` when methods called did not
- match a known expectation. Since 0.8.0, this behaviour was switched to
- returning ``null`` instead. You can restore the 0.7.2 behavour by using the
- following:
-
- .. code-block:: php
-
- $mock = \Mockery::mock('stdClass')->shouldIgnoreMissing()->asUndefined();
diff --git a/vendor/mockery/mockery/docs/index.rst b/vendor/mockery/mockery/docs/index.rst
deleted file mode 100644
index 8f09b6c4417..00000000000
--- a/vendor/mockery/mockery/docs/index.rst
+++ /dev/null
@@ -1,64 +0,0 @@
-Mockery
-=======
-
-Mockery is a simple yet flexible PHP mock object framework for use in unit
-testing with PHPUnit, PHPSpec or any other testing framework. Its core goal is
-to offer a test double framework with a succinct API capable of clearly
-defining all possible object operations and interactions using a human
-readable Domain Specific Language (DSL). Designed as a drop in alternative to
-PHPUnit's phpunit-mock-objects library, Mockery is easy to integrate with
-PHPUnit and can operate alongside phpunit-mock-objects without the World
-ending.
-
-Mock Objects
-------------
-
-In unit tests, mock objects simulate the behaviour of real objects. They are
-commonly utilised to offer test isolation, to stand in for objects which do
-not yet exist, or to allow for the exploratory design of class APIs without
-requiring actual implementation up front.
-
-The benefits of a mock object framework are to allow for the flexible
-generation of such mock objects (and stubs). They allow the setting of
-expected method calls and return values using a flexible API which is capable
-of capturing every possible real object behaviour in way that is stated as
-close as possible to a natural language description.
-
-Getting Started
----------------
-
-Ready to dive into the Mockery framework? Then you can get started by reading
-the "Getting Started" section!
-
-.. toctree::
- :hidden:
-
- getting_started/index
-
-.. include:: getting_started/map.rst.inc
-
-Reference
----------
-
-The reference contains a complete overview of all features of the Mockery
-framework.
-
-.. toctree::
- :hidden:
-
- reference/index
-
-.. include:: reference/map.rst.inc
-
-Cookbook
---------
-
-Want to learn some easy tips and tricks? Take a look at the cookbook articles!
-
-.. toctree::
- :hidden:
-
- cookbook/index
-
-.. include:: cookbook/map.rst.inc
-
diff --git a/vendor/mockery/mockery/docs/reference/argument_validation.rst b/vendor/mockery/mockery/docs/reference/argument_validation.rst
deleted file mode 100644
index 2696fc89d56..00000000000
--- a/vendor/mockery/mockery/docs/reference/argument_validation.rst
+++ /dev/null
@@ -1,168 +0,0 @@
-.. index::
- single: Argument Validation
-
-Argument Validation
-===================
-
-The arguments passed to the ``with()`` declaration when setting up an
-expectation determine the criteria for matching method calls to expectations.
-Thus, you can setup up many expectations for a single method, each
-differentiated by the expected arguments. Such argument matching is done on a
-"best fit" basis. This ensures explicit matches take precedence over
-generalised matches.
-
-An explicit match is merely where the expected argument and the actual
-argument are easily equated (i.e. using ``===`` or ``==``). More generalised
-matches are possible using regular expressions, class hinting and the
-available generic matchers. The purpose of generalised matchers is to allow
-arguments be defined in non-explicit terms, e.g. ``Mockery::any()`` passed to
-``with()`` will match **any** argument in that position.
-
-Mockery's generic matchers do not cover all possibilities but offers optional
-support for the Hamcrest library of matchers. Hamcrest is a PHP port of the
-similarly named Java library (which has been ported also to Python, Erlang,
-etc). I strongly recommend using Hamcrest since Mockery simply does not need
-to duplicate Hamcrest's already impressive utility which itself promotes a
-natural English DSL.
-
-The example below show Mockery matchers and their Hamcrest equivalent.
-Hamcrest uses functions (no namespacing).
-
-Here's a sample of the possibilities.
-
-.. code-block:: php
-
- with(1)
-
-Matches the integer ``1``. This passes the ``===`` test (identical). It does
-facilitate a less strict ``==`` check (equals) where the string ``'1'`` would
-also match the
-argument.
-
-.. code-block:: php
-
- with(\Mockery::any()) OR with(anything())
-
-Matches any argument. Basically, anything and everything passed in this
-argument slot is passed unconstrained.
-
-.. code-block:: php
-
- with(\Mockery::type('resource')) OR with(resourceValue()) OR with(typeOf('resource'))
-
-Matches any resource, i.e. returns true from an ``is_resource()`` call. The
-Type matcher accepts any string which can be attached to ``is_`` to form a
-valid type check. For example, ``\Mockery::type('float')`` or Hamcrest's
-``floatValue()`` and ``typeOf('float')`` checks using ``is_float()``, and
-``\Mockery::type('callable')`` or Hamcrest's ``callable()`` uses
-``is_callable()``.
-
-The Type matcher also accepts a class or interface name to be used in an
-``instanceof`` evaluation of the actual argument (similarly Hamcrest uses
-``anInstanceOf()``).
-
-You may find a full list of the available type checkers at
-`php.net `_ or browse Hamcrest's function
-list in
-`the Hamcrest code `_.
-
-.. code-block:: php
-
- with(\Mockery::on(closure))
-
-The On matcher accepts a closure (anonymous function) to which the actual
-argument will be passed. If the closure evaluates to (i.e. returns) boolean
-``true`` then the argument is assumed to have matched the expectation. This is
-invaluable where your argument expectation is a bit too complex for or simply
-not implemented in the current default matchers.
-
-There is no Hamcrest version of this functionality.
-
-.. code-block:: php
-
- with('/^foo/') OR with(matchesPattern('/^foo/'))
-
-The argument declarator also assumes any given string may be a regular
-expression to be used against actual arguments when matching. The regex option
-is only used when a) there is no ``===`` or ``==`` match and b) when the regex
-is verified to be a valid regex (i.e. does not return false from
-``preg_match()``). If the regex detection doesn't suit your tastes, Hamcrest
-offers the more explicit ``matchesPattern()`` function.
-
-.. code-block:: php
-
- with(\Mockery::ducktype('foo', 'bar'))
-
-The Ducktype matcher is an alternative to matching by class type. It simply
-matches any argument which is an object containing the provided list of
-methods to call.
-
-There is no Hamcrest version of this functionality.
-
-.. code-block:: php
-
- with(\Mockery::mustBe(2)) OR with(identicalTo(2))
-
-The MustBe matcher is more strict than the default argument matcher. The
-default matcher allows for PHP type casting, but the MustBe matcher also
-verifies that the argument must be of the same type as the expected value.
-Thus by default, the argument `'2'` matches the actual argument 2 (integer)
-but the MustBe matcher would fail in the same situation since the expected
-argument was a string and instead we got an integer.
-
-Note: Objects are not subject to an identical comparison using this matcher
-since PHP would fail the comparison if both objects were not the exact same
-instance. This is a hindrance when objects are generated prior to being
-returned, since an identical match just would never be possible.
-
-.. code-block:: php
-
- with(\Mockery::not(2)) OR with(not(2))
-
-The Not matcher matches any argument which is not equal or identical to the
-matcher's parameter.
-
-.. code-block:: php
-
- with(\Mockery::anyOf(1, 2)) OR with(anyOf(1,2))
-
-Matches any argument which equals any one of the given parameters.
-
-.. code-block:: php
-
- with(\Mockery::notAnyOf(1, 2))
-
-Matches any argument which is not equal or identical to any of the given
-parameters.
-
-There is no Hamcrest version of this functionality.
-
-.. code-block:: php
-
- with(\Mockery::subset(array(0 => 'foo')))
-
-Matches any argument which is any array containing the given array subset.
-This enforces both key naming and values, i.e. both the key and value of each
-actual element is compared.
-
-There is no Hamcrest version of this functionality, though Hamcrest can check
-a single entry using ``hasEntry()`` or ``hasKeyValuePair()``.
-
-.. code-block:: php
-
- with(\Mockery::contains(value1, value2))
-
-Matches any argument which is an array containing the listed values. The
-naming of keys is ignored.
-
-.. code-block:: php
-
- with(\Mockery::hasKey(key));
-
-Matches any argument which is an array containing the given key name.
-
-.. code-block:: php
-
- with(\Mockery::hasValue(value));
-
-Matches any argument which is an array containing the given value.
diff --git a/vendor/mockery/mockery/docs/reference/demeter_chains.rst b/vendor/mockery/mockery/docs/reference/demeter_chains.rst
deleted file mode 100644
index 531d017fb12..00000000000
--- a/vendor/mockery/mockery/docs/reference/demeter_chains.rst
+++ /dev/null
@@ -1,38 +0,0 @@
-.. index::
- single: Mocking; Demeter Chains
-
-Mocking Demeter Chains And Fluent Interfaces
-============================================
-
-Both of these terms refer to the growing practice of invoking statements
-similar to:
-
-.. code-block:: php
-
- $object->foo()->bar()->zebra()->alpha()->selfDestruct();
-
-The long chain of method calls isn't necessarily a bad thing, assuming they
-each link back to a local object the calling class knows. Just as a fun
-example, Mockery's long chains (after the first ``shouldReceive()`` method)
-all call to the same instance of ``\Mockery\Expectation``. However, sometimes
-this is not the case and the chain is constantly crossing object boundaries.
-
-In either case, mocking such a chain can be a horrible task. To make it easier
-Mockery support demeter chain mocking. Essentially, we shortcut through the
-chain and return a defined value from the final call. For example, let's
-assume ``selfDestruct()`` returns the string "Ten!" to $object (an instance of
-``CaptainsConsole``). Here's how we could mock it.
-
-.. code-block:: php
-
- $mock = \Mockery::mock('CaptainsConsole');
- $mock->shouldReceive('foo->bar->zebra->alpha->selfDestruct')->andReturn('Ten!');
-
-The above expectation can follow any previously seen format or expectation,
-except that the method name is simply the string of all expected chain calls
-separated by ``->``. Mockery will automatically setup the chain of expected
-calls with its final return values, regardless of whatever intermediary object
-might be used in the real implementation.
-
-Arguments to all members of the chain (except the final call) are ignored in
-this process.
diff --git a/vendor/mockery/mockery/docs/reference/expectations.rst b/vendor/mockery/mockery/docs/reference/expectations.rst
deleted file mode 100644
index e9175098d6b..00000000000
--- a/vendor/mockery/mockery/docs/reference/expectations.rst
+++ /dev/null
@@ -1,260 +0,0 @@
-.. index::
- single: Expectations
-
-Expectation Declarations
-========================
-
-Once you have created a mock object, you'll often want to start defining how
-exactly it should behave (and how it should be called). This is where the
-Mockery expectation declarations take over.
-
-.. code-block:: php
-
- shouldReceive(method_name)
-
-Declares that the mock expects a call to the given method name. This is the
-starting expectation upon which all other expectations and constraints are
-appended.
-
-.. code-block:: php
-
- shouldReceive(method1, method2, ...)
-
-Declares a number of expected method calls, all of which will adopt any
-chained expectations or constraints.
-
-.. code-block:: php
-
- shouldReceive(array('method1'=>1, 'method2'=>2, ...))
-
-Declares a number of expected calls but also their return values. All will
-adopt any additional chained expectations or constraints.
-
-.. code-block:: php
-
- shouldReceive(closure)
-
-Creates a mock object (only from a partial mock) which is used to create a
-mock object recorder. The recorder is a simple proxy to the original object
-passed in for mocking. This is passed to the closure, which may run it through
-a set of operations which are recorded as expectations on the partial mock. A
-simple use case is automatically recording expectations based on an existing
-usage (e.g. during refactoring). See examples in a later section.
-
-.. code-block:: php
-
- shouldNotReceive(method_name)
-
-Declares that the mock should not expect a call to the given method name. This
-method is a convenience method for calling ``shouldReceive()->never()``.
-
-.. code-block:: php
-
- with(arg1, arg2, ...) / withArgs(array(arg1, arg2, ...))
-
-Adds a constraint that this expectation only applies to method calls which
-match the expected argument list. You can add a lot more flexibility to
-argument matching using the built in matcher classes (see later). For example,
-``\Mockery::any()`` matches any argument passed to that position in the
-``with()`` parameter list. Mockery also allows Hamcrest library matchers - for
-example, the Hamcrest function ``anything()`` is equivalent to
-``\Mockery::any()``.
-
-It's important to note that this means all expectations attached only apply to
-the given method when it is called with these exact arguments. This allows for
-setting up differing expectations based on the arguments provided to expected
-calls.
-
-.. code-block:: php
-
- withAnyArgs()
-
-Declares that this expectation matches a method call regardless of what
-arguments are passed. This is set by default unless otherwise specified.
-
-.. code-block:: php
-
- withNoArgs()
-
-Declares this expectation matches method calls with zero arguments.
-
-.. code-block:: php
-
- andReturn(value)
-
-Sets a value to be returned from the expected method call.
-
-.. code-block:: php
-
- andReturn(value1, value2, ...)
-
-Sets up a sequence of return values or closures. For example, the first call
-will return value1 and the second value2. Note that all subsequent calls to a
-mocked method will always return the final value (or the only value) given to
-this declaration.
-
-.. code-block:: php
-
- andReturnNull() / andReturn([NULL])
-
-Both of the above options are primarily for communication to test readers.
-They mark the mock object method call as returning ``null`` or nothing.
-
-.. code-block:: php
-
- andReturnValues(array)
-
-Alternative syntax for ``andReturn()`` that accepts a simple array instead of
-a list of parameters. The order of return is determined by the numerical
-index of the given array with the last array member being return on all calls
-once previous return values are exhausted.
-
-.. code-block:: php
-
- andReturnUsing(closure, ...)
-
-Sets a closure (anonymous function) to be called with the arguments passed to
-the method. The return value from the closure is then returned. Useful for
-some dynamic processing of arguments into related concrete results. Closures
-can queued by passing them as extra parameters as for ``andReturn()``.
-
-.. note::
-
- You cannot currently mix ``andReturnUsing()`` with ``andReturn()``.
-
-.. code-block:: php
-
- andThrow(Exception)
-
-Declares that this method will throw the given ``Exception`` object when
-called.
-
-.. code-block:: php
-
- andThrow(exception_name, message)
-
-Rather than an object, you can pass in the ``Exception`` class and message to
-use when throwing an ``Exception`` from the mocked method.
-
-.. code-block:: php
-
- andSet(name, value1) / set(name, value1)
-
-Used with an expectation so that when a matching method is called, one can
-also cause a mock object's public property to be set to a specified value.
-
-.. code-block:: php
-
- passthru()
-
-Tells the expectation to bypass a return queue and instead call the real
-method of the class that was mocked and return the result. Basically, it
-allows expectation matching and call count validation to be applied against
-real methods while still calling the real class method with the expected
-arguments.
-
-.. code-block:: php
-
- zeroOrMoreTimes()
-
-Declares that the expected method may be called zero or more times. This is
-the default for all methods unless otherwise set.
-
-.. code-block:: php
-
- once()
-
-Declares that the expected method may only be called once. Like all other call
-count constraints, it will throw a ``\Mockery\CountValidator\Exception`` if
-breached and can be modified by the ``atLeast()`` and ``atMost()``
-constraints.
-
-.. code-block:: php
-
- twice()
-
-Declares that the expected method may only be called twice.
-
-.. code-block:: php
-
- times(n)
-
-Declares that the expected method may only be called n times.
-
-.. code-block:: php
-
- never()
-
-Declares that the expected method may never be called. Ever!
-
-.. code-block:: php
-
- atLeast()
-
-Adds a minimum modifier to the next call count expectation. Thus
-``atLeast()->times(3)`` means the call must be called at least three times
-(given matching method args) but never less than three times.
-
-.. code-block:: php
-
- atMost()
-
-Adds a maximum modifier to the next call count expectation. Thus
-``atMost()->times(3)`` means the call must be called no more than three times.
-This also means no calls are acceptable.
-
-.. code-block:: php
-
- between(min, max)
-
-Sets an expected range of call counts. This is actually identical to using
-``atLeast()->times(min)->atMost()->times(max)`` but is provided as a
-shorthand. It may be followed by a ``times()`` call with no parameter to
-preserve the APIs natural language readability.
-
-.. code-block:: php
-
- ordered()
-
-Declares that this method is expected to be called in a specific order in
-relation to similarly marked methods. The order is dictated by the order in
-which this modifier is actually used when setting up mocks.
-
-.. code-block:: php
-
- ordered(group)
-
-Declares the method as belonging to an order group (which can be named or
-numbered). Methods within a group can be called in any order, but the ordered
-calls from outside the group are ordered in relation to the group, i.e. you
-can set up so that method1 is called before group1 which is in turn called
-before method 2.
-
-.. code-block:: php
-
- globally()
-
-When called prior to ``ordered()`` or ``ordered(group)``, it declares this
-ordering to apply across all mock objects (not just the current mock). This
-allows for dictating order expectations across multiple mocks.
-
-.. code-block:: php
-
- byDefault()
-
-Marks an expectation as a default. Default expectations are applied unless a
-non-default expectation is created. These later expectations immediately
-replace the previously defined default. This is useful so you can setup
-default mocks in your unit test ``setup()`` and later tweak them in specific
-tests as needed.
-
-.. code-block:: php
-
- getMock()
-
-Returns the current mock object from an expectation chain. Useful where you
-prefer to keep mock setups as a single statement, e.g.
-
-.. code-block:: php
-
- $mock = \Mockery::mock('foo')->shouldReceive('foo')->andReturn(1)->getMock();
diff --git a/vendor/mockery/mockery/docs/reference/final_methods_classes.rst b/vendor/mockery/mockery/docs/reference/final_methods_classes.rst
deleted file mode 100644
index 4f8783aed23..00000000000
--- a/vendor/mockery/mockery/docs/reference/final_methods_classes.rst
+++ /dev/null
@@ -1,23 +0,0 @@
-.. index::
- single: Mocking; Final Classes/Methods
-
-Dealing with Final Classes/Methods
-==================================
-
-One of the primary restrictions of mock objects in PHP, is that mocking
-classes or methods marked final is hard. The final keyword prevents methods so
-marked from being replaced in subclasses (subclassing is how mock objects can
-inherit the type of the class or object being mocked.
-
-The simplest solution is not to mark classes or methods as final!
-
-However, in a compromise between mocking functionality and type safety,
-Mockery does allow creating "proxy mocks" from classes marked final, or from
-classes with methods marked final. This offers all the usual mock object
-goodness but the resulting mock will not inherit the class type of the object
-being mocked, i.e. it will not pass any instanceof comparison.
-
-You can create a proxy mock by passing the instantiated object you wish to
-mock into ``\Mockery::mock()``, i.e. Mockery will then generate a Proxy to the
-real object and selectively intercept method calls for the purposes of setting
-and meeting expectations.
diff --git a/vendor/mockery/mockery/docs/reference/index.rst b/vendor/mockery/mockery/docs/reference/index.rst
deleted file mode 100644
index fe693c6732b..00000000000
--- a/vendor/mockery/mockery/docs/reference/index.rst
+++ /dev/null
@@ -1,20 +0,0 @@
-Reference
-=========
-
-.. toctree::
- :hidden:
-
- startup_methods
- expectations
- argument_validation
- partial_mocks
- public_properties
- public_static_properties
- pass_by_reference_behaviours
- demeter_chains
- object_recording
- final_methods_classes
- magic_methods
- mockery/index
-
-.. include:: map.rst.inc
diff --git a/vendor/mockery/mockery/docs/reference/instance_mocking.rst b/vendor/mockery/mockery/docs/reference/instance_mocking.rst
deleted file mode 100644
index 9d1aa283eb1..00000000000
--- a/vendor/mockery/mockery/docs/reference/instance_mocking.rst
+++ /dev/null
@@ -1,22 +0,0 @@
-.. index::
- single: Mocking; Instance
-
-Instance Mocking
-================
-
-Instance mocking means that a statement like:
-
-.. code-block:: php
-
- $obj = new \MyNamespace\Foo;
-
-...will actually generate a mock object. This is done by replacing the real
-class with an instance mock (similar to an alias mock), as with mocking public
-methods. The alias will import its expectations from the original mock of
-that type (note that the original is never verified and should be ignored
-after its expectations are setup). This lets you intercept instantiation where
-you can't simply inject a replacement object.
-
-As before, this does not prevent a require statement from including the real
-class and triggering a fatal PHP error. It's intended for use where
-autoloading is the primary class loading mechanism.
diff --git a/vendor/mockery/mockery/docs/reference/magic_methods.rst b/vendor/mockery/mockery/docs/reference/magic_methods.rst
deleted file mode 100644
index da5cee438e5..00000000000
--- a/vendor/mockery/mockery/docs/reference/magic_methods.rst
+++ /dev/null
@@ -1,16 +0,0 @@
-.. index::
- single: Mocking; Magic Methods
-
-PHP Magic Methods
-=================
-
-PHP magic methods which are prefixed with a double underscore, e.g.
-``__set()``, pose a particular problem in mocking and unit testing in general.
-It is strongly recommended that unit tests and mock objects do not directly
-refer to magic methods. Instead, refer only to the virtual methods and
-properties these magic methods simulate.
-
-Following this piece of advice will ensure you are testing the real API of
-classes and also ensures there is no conflict should Mockery override these
-magic methods, which it will inevitably do in order to support its role in
-intercepting method calls and properties.
diff --git a/vendor/mockery/mockery/docs/reference/map.rst.inc b/vendor/mockery/mockery/docs/reference/map.rst.inc
deleted file mode 100644
index 88ea36b82ba..00000000000
--- a/vendor/mockery/mockery/docs/reference/map.rst.inc
+++ /dev/null
@@ -1,19 +0,0 @@
-* :doc:`/reference/startup_methods`
-* :doc:`/reference/expectations`
-* :doc:`/reference/argument_validation`
-* :doc:`/reference/partial_mocks`
-* :doc:`/reference/public_properties`
-* :doc:`/reference/public_static_properties`
-* :doc:`/reference/pass_by_reference_behaviours`
-* :doc:`/reference/demeter_chains`
-* :doc:`/reference/object_recording`
-* :doc:`/reference/final_methods_classes`
-* :doc:`/reference/magic_methods`
-
-Mockery Reference
------------------
-
-* :doc:`/reference/mockery/configuration`
-* :doc:`/reference/mockery/exceptions`
-* :doc:`/reference/mockery/reserved_method_names`
-* :doc:`/reference/mockery/gotchas`
diff --git a/vendor/mockery/mockery/docs/reference/mockery/configuration.rst b/vendor/mockery/mockery/docs/reference/mockery/configuration.rst
deleted file mode 100644
index 9f8db744472..00000000000
--- a/vendor/mockery/mockery/docs/reference/mockery/configuration.rst
+++ /dev/null
@@ -1,52 +0,0 @@
-.. index::
- single: Mockery; Configuration
-
-Mockery Global Configuration
-============================
-
-To allow for a degree of fine-tuning, Mockery utilises a singleton
-configuration object to store a small subset of core behaviours. The three
-currently present include:
-
-* Option to allow/disallow the mocking of methods which do not actually exist
-* Option to allow/disallow the existence of expectations which are never
- fulfilled (i.e. unused)
-* Setter/Getter for added a parameter map for internal PHP class methods
- (``Reflection`` cannot detect these automatically)
-
-By default, the first two behaviours are enabled. Of course, there are
-situations where this can lead to unintended consequences. The mocking of
-non-existent methods may allow mocks based on real classes/objects to fall out
-of sync with the actual implementations, especially when some degree of
-integration testing (testing of object wiring) is not being performed.
-Allowing unfulfilled expectations means unnecessary mock expectations go
-unnoticed, cluttering up test code, and potentially confusing test readers.
-
-You may allow or disallow these behaviours (whether for whole test suites or
-just select tests) by using one or both of the following two calls:
-
-.. code-block:: php
-
- \Mockery::getConfiguration()->allowMockingNonExistentMethods(bool);
- \Mockery::getConfiguration()->allowMockingMethodsUnnecessarily(bool);
-
-Passing a true allows the behaviour, false disallows it. Both take effect
-immediately until switched back. In both cases, if either behaviour is
-detected when not allowed, it will result in an Exception being thrown at that
-point. Note that disallowing these behaviours should be carefully considered
-since they necessarily remove at least some of Mockery's flexibility.
-
-The other two methods are:
-
-.. code-block:: php
-
- \Mockery::getConfiguration()->setInternalClassMethodParamMap($class, $method, array $paramMap)
- \Mockery::getConfiguration()->getInternalClassMethodParamMap($class, $method)
-
-These are used to define parameters (i.e. the signature string of each) for the
-methods of internal PHP classes (e.g. SPL, or PECL extension classes like
-ext/mongo's MongoCollection. Reflection cannot analyse the parameters of internal
-classes. Most of the time, you never need to do this. It's mainly needed where an
-internal class method uses pass-by-reference for a parameter - you MUST in such
-cases ensure the parameter signature includes the ``&`` symbol correctly as Mockery
-won't correctly add it automatically for internal classes.
diff --git a/vendor/mockery/mockery/docs/reference/mockery/exceptions.rst b/vendor/mockery/mockery/docs/reference/mockery/exceptions.rst
deleted file mode 100644
index 623b158e2c0..00000000000
--- a/vendor/mockery/mockery/docs/reference/mockery/exceptions.rst
+++ /dev/null
@@ -1,65 +0,0 @@
-.. index::
- single: Mockery; Exceptions
-
-Mockery Exceptions
-==================
-
-Mockery throws three types of exceptions when it cannot verify a mock object.
-
-#. ``\Mockery\Exception\InvalidCountException``
-#. ``\Mockery\Exception\InvalidOrderException``
-#. ``\Mockery\Exception\NoMatchingExpectationException``
-
-You can capture any of these exceptions in a try...catch block to query them
-for specific information which is also passed along in the exception message
-but is provided separately from getters should they be useful when logging or
-reformatting output.
-
-\Mockery\Exception\InvalidCountException
-----------------------------------------
-
-The exception class is used when a method is called too many (or too few)
-times and offers the following methods:
-
-* ``getMock()`` - return actual mock object
-* ``getMockName()`` - return the name of the mock object
-* ``getMethodName()`` - return the name of the method the failing expectation
- is attached to
-* ``getExpectedCount()`` - return expected calls
-* ``getExpectedCountComparative()`` - returns a string, e.g. ``<=`` used to
- compare to actual count
-* ``getActualCount()`` - return actual calls made with given argument
- constraints
-
-\Mockery\Exception\InvalidOrderException
-----------------------------------------
-
-The exception class is used when a method is called outside the expected order
-set using the ``ordered()`` and ``globally()`` expectation modifiers. It
-offers the following methods:
-
-* ``getMock()`` - return actual mock object
-* ``getMockName()`` - return the name of the mock object
-* ``getMethodName()`` - return the name of the method the failing expectation
- is attached to
-* ``getExpectedOrder()`` - returns an integer represented the expected index
- for which this call was expected
-* ``getActualOrder()`` - return the actual index at which this method call
- occurred.
-
-\Mockery\Exception\NoMatchingExpectationException
--------------------------------------------------
-
-The exception class is used when a method call does not match any known
-expectation. All expectations are uniquely identified in a mock object by the
-method name and the list of expected arguments. You can disable this exception
-and opt for returning NULL from all unexpected method calls by using the
-earlier mentioned shouldIgnoreMissing() behaviour modifier. This exception
-class offers the following methods:
-
-* ``getMock()`` - return actual mock object
-* ``getMockName()`` - return the name of the mock object
-* ``getMethodName()`` - return the name of the method the failing expectation
- is attached to
-* ``getActualArguments()`` - return actual arguments used to search for a
- matching expectation
diff --git a/vendor/mockery/mockery/docs/reference/mockery/gotchas.rst b/vendor/mockery/mockery/docs/reference/mockery/gotchas.rst
deleted file mode 100644
index 2d3ff6ce80b..00000000000
--- a/vendor/mockery/mockery/docs/reference/mockery/gotchas.rst
+++ /dev/null
@@ -1,42 +0,0 @@
-.. index::
- single: Mockery; Gotchas
-
-Gotchas!
-========
-
-Mocking objects in PHP has its limitations and gotchas. Some functionality
-can't be mocked or can't be mocked YET! If you locate such a circumstance,
-please please (pretty please with sugar on top) create a new issue on GitHub
-so it can be documented and resolved where possible. Here is a list to note:
-
-1. Classes containing public ``__wakeup()`` methods can be mocked but the
- mocked ``__wakeup()`` method will perform no actions and cannot have
- expectations set for it. This is necessary since Mockery must serialize and
- unserialize objects to avoid some ``__construct()`` insanity and attempting
- to mock a ``__wakeup()`` method as normal leads to a
- ``BadMethodCallException`` been thrown.
-
-2. Classes using non-real methods, i.e. where a method call triggers a
- ``__call()`` method, will throw an exception that the non-real method does
- not exist unless you first define at least one expectation (a simple
- ``shouldReceive()`` call would suffice). This is necessary since there is
- no other way for Mockery to be aware of the method name.
-
-3. Mockery has two scenarios where real classes are replaced: Instance mocks
- and alias mocks. Both will generate PHP fatal errors if the real class is
- loaded, usually via a require or include statement. Only use these two mock
- types where autoloading is in place and where classes are not explicitly
- loaded on a per-file basis using ``require()``, ``require_once()``, etc.
-
-4. Internal PHP classes are not entirely capable of being fully analysed using
- ``Reflection``. For example, ``Reflection`` cannot reveal details of
- expected parameters to the methods of such internal classes. As a result,
- there will be problems where a method parameter is defined to accept a
- value by reference (Mockery cannot detect this condition and will assume a
- pass by value on scalars and arrays). If references as internal class
- method parameters are needed, you should use the
- ``\Mockery\Configuration::setInternalClassMethodParamMap()`` method.
-
-The gotchas noted above are largely down to PHP's architecture and are assumed
-to be unavoidable. But - if you figure out a solution (or a better one than
-what may exist), let us know!
diff --git a/vendor/mockery/mockery/docs/reference/mockery/index.rst b/vendor/mockery/mockery/docs/reference/mockery/index.rst
deleted file mode 100644
index 6951b0ad1a7..00000000000
--- a/vendor/mockery/mockery/docs/reference/mockery/index.rst
+++ /dev/null
@@ -1,10 +0,0 @@
-Mockery
-=======
-
-.. toctree::
- :maxdepth: 2
-
- configuration
- exceptions
- reserved_method_names
- gotchas
diff --git a/vendor/mockery/mockery/docs/reference/mockery/reserved_method_names.rst b/vendor/mockery/mockery/docs/reference/mockery/reserved_method_names.rst
deleted file mode 100644
index 112d6f0a56b..00000000000
--- a/vendor/mockery/mockery/docs/reference/mockery/reserved_method_names.rst
+++ /dev/null
@@ -1,20 +0,0 @@
-.. index::
- single: Reserved Method Names
-
-Reserved Method Names
-=====================
-
-As you may have noticed, Mockery uses a number of methods called directly on
-all mock objects, for example ``shouldReceive()``. Such methods are necessary
-in order to setup expectations on the given mock, and so they cannot be
-implemented on the classes or objects being mocked without creating a method
-name collision (reported as a PHP fatal error). The methods reserved by
-Mockery are:
-
-* ``shouldReceive()``
-* ``shouldBeStrict()``
-
-In addition, all mocks utilise a set of added methods and protected properties
-which cannot exist on the class or object being mocked. These are far less
-likely to cause collisions. All properties are prefixed with ``_mockery`` and
-all method names with ``mockery_``.
diff --git a/vendor/mockery/mockery/docs/reference/object_recording.rst b/vendor/mockery/mockery/docs/reference/object_recording.rst
deleted file mode 100644
index 9578e81bea3..00000000000
--- a/vendor/mockery/mockery/docs/reference/object_recording.rst
+++ /dev/null
@@ -1,93 +0,0 @@
-.. index::
- single: Mocking; Object Recording
-
-Mock Object Recording
-=====================
-
-In certain cases, you may find that you are testing against an already
-established pattern of behaviour, perhaps during refactoring. Rather then hand
-crafting mock object expectations for this behaviour, you could instead use
-the existing source code to record the interactions a real object undergoes
-onto a mock object as expectations - expectations you can then verify against
-an alternative or refactored version of the source code.
-
-To record expectations, you need a concrete instance of the class to be
-mocked. This can then be used to create a partial mock to which is given the
-necessary code to execute the object interactions to be recorded. A simple
-example is outline below (we use a closure for passing instructions to the
-mock).
-
-Here we have a very simple setup, a class (``SubjectUser``) which uses another
-class (``Subject``) to retrieve some value. We want to record as expectations
-on our mock (which will replace ``Subject`` later) all the calls and return
-values of a Subject instance when interacting with ``SubjectUser``.
-
-.. code-block:: php
-
- class Subject
- {
-
- public function execute() {
- return 'executed!';
- }
-
- }
-
- class SubjectUser
- {
-
- public function use(Subject $subject) {
- return $subject->execute();
- }
-
- }
-
-Here's the test case showing the recording:
-
-.. code-block:: php
-
- class SubjectUserTest extends PHPUnit_Framework_TestCase
- {
-
- public function tearDown()
- {
- \Mockery::close();
- }
-
- public function testSomething()
- {
- $mock = \Mockery::mock(new Subject);
- $mock->shouldExpect(function ($subject) {
- $user = new SubjectUser;
- $user->use($subject);
- });
-
- /**
- * Assume we have a replacement SubjectUser called NewSubjectUser.
- * We want to verify it behaves identically to SubjectUser, i.e.
- * it uses Subject in the exact same way
- */
- $newSubject = new NewSubjectUser;
- $newSubject->use($mock);
- }
-
- }
-
-After the ``\Mockery::close()`` call in ``tearDown()`` validates the mock
-object, we should have zero exceptions if ``NewSubjectUser`` acted on
-`Subject` in a similar way to ``SubjectUser``. By default the order of calls
-are not enforced, and loose argument matching is enabled, i.e. arguments may
-be equal (``==``) but not necessarily identical (``===``).
-
-If you wished to be more strict, for example ensuring the order of calls and
-the final call counts were identical, or ensuring arguments are completely
-identical, you can invoke the recorder's strict mode from the closure block,
-e.g.
-
-.. code-block:: php
-
- $mock->shouldExpect(function ($subject) {
- $subject->shouldBeStrict();
- $user = new SubjectUser;
- $user->use($subject);
- });
diff --git a/vendor/mockery/mockery/docs/reference/partial_mocks.rst b/vendor/mockery/mockery/docs/reference/partial_mocks.rst
deleted file mode 100644
index 1e46c5a9c47..00000000000
--- a/vendor/mockery/mockery/docs/reference/partial_mocks.rst
+++ /dev/null
@@ -1,94 +0,0 @@
-.. index::
- single: Mocking; Partial Mocks
-
-Creating Partial Mocks
-======================
-
-Partial mocks are useful when you only need to mock several methods of an
-object leaving the remainder free to respond to calls normally (i.e. as
-implemented). Mockery implements three distinct strategies for creating
-partials. Each has specific advantages and disadvantages so which strategy you
-use will depend on your own preferences and the source code in need of
-mocking.
-
-#. Traditional Partial Mock
-#. Passive Partial Mock
-#. Proxied Partial Mock
-
-Traditional Partial Mock
-------------------------
-
-A traditional partial mock, defines ahead of time which methods of a class are
-to be mocked and which are to be left unmocked (i.e. callable as normal). The
-syntax for creating traditional mocks is:
-
-.. code-block:: php
-
- $mock = \Mockery::mock('MyClass[foo,bar]');
-
-In the above example, the ``foo()`` and ``bar()`` methods of MyClass will be
-mocked but no other MyClass methods are touched. You will need to define
-expectations for the ``foo()`` and ``bar()`` methods to dictate their mocked
-behaviour.
-
-Don't forget that you can pass in constructor arguments since unmocked methods
-may rely on those!
-
-.. code-block:: php
-
- $mock = \Mockery::mock('MyNamespace\MyClass[foo]', array($arg1, $arg2));
-
-Passive Partial Mock
---------------------
-
-A passive partial mock is more of a default state of being.
-
-.. code-block:: php
-
- $mock = \Mockery::mock('MyClass')->makePartial();
-
-In a passive partial, we assume that all methods will simply defer to the
-parent class (``MyClass``) original methods unless a method call matches a
-known expectation. If you have no matching expectation for a specific method
-call, that call is deferred to the class being mocked. Since the division
-between mocked and unmocked calls depends entirely on the expectations you
-define, there is no need to define which methods to mock in advance. The
-``makePartial()`` method is identical to the original ``shouldDeferMissing()``
-method which first introduced this Partial Mock type.
-
-Proxied Partial Mock
---------------------
-
-A proxied partial mock is a partial of last resort. You may encounter a class
-which is simply not capable of being mocked because it has been marked as
-final. Similarly, you may find a class with methods marked as final. In such a
-scenario, we cannot simply extend the class and override methods to mock - we
-need to get creative.
-
-.. code-block:: php
-
- $mock = \Mockery::mock(new MyClass);
-
-Yes, the new mock is a Proxy. It intercepts calls and reroutes them to the
-proxied object (which you construct and pass in) for methods which are not
-subject to any expectations. Indirectly, this allows you to mock methods
-marked final since the Proxy is not subject to those limitations. The tradeoff
-should be obvious - a proxied partial will fail any typehint checks for the
-class being mocked since it cannot extend that class.
-
-Special Internal Cases
-----------------------
-
-All mock objects, with the exception of Proxied Partials, allow you to make
-any expectation call the underlying real class method using the ``passthru()``
-expectation call. This will return values from the real call and bypass any
-mocked return queue (which can simply be omitted obviously).
-
-There is a fourth kind of partial mock reserved for internal use. This is
-automatically generated when you attempt to mock a class containing methods
-marked final. Since we cannot override such methods, they are simply left
-unmocked. Typically, you don't need to worry about this but if you really
-really must mock a final method, the only possible means is through a Proxied
-Partial Mock. SplFileInfo, for example, is a common class subject to this form
-of automatic internal partial since it contains public final methods used
-internally.
diff --git a/vendor/mockery/mockery/docs/reference/pass_by_reference_behaviours.rst b/vendor/mockery/mockery/docs/reference/pass_by_reference_behaviours.rst
deleted file mode 100644
index ac4cdbad6cd..00000000000
--- a/vendor/mockery/mockery/docs/reference/pass_by_reference_behaviours.rst
+++ /dev/null
@@ -1,83 +0,0 @@
-.. index::
- single: Pass-By-Reference Method Parameter Behaviour
-
-Preserving Pass-By-Reference Method Parameter Behaviour
-=======================================================
-
-PHP Class method may accept parameters by reference. In this case, changes
-made to the parameter (a reference to the original variable passed to the
-method) are reflected in the original variable. A simple example:
-
-.. code-block:: php
-
- class Foo
- {
-
- public function bar(&$a)
- {
- $a++;
- }
-
- }
-
- $baz = 1;
- $foo = new Foo;
- $foo->bar($baz);
-
- echo $baz; // will echo the integer 2
-
-In the example above, the variable $baz is passed by reference to
-``Foo::bar()`` (notice the ``&`` symbol in front of the parameter?). Any
-change ``bar()`` makes to the parameter reference is reflected in the original
-variable, ``$baz``.
-
-Mockery 0.7+ handles references correctly for all methods where it can analyse
-the parameter (using ``Reflection``) to see if it is passed by reference. To
-mock how a reference is manipulated by the class method, you can use a closure
-argument matcher to manipulate it, i.e. ``\Mockery::on()`` - see the
-":doc:`argument_validation`" chapter.
-
-There is an exception for internal PHP classes where Mockery cannot analyse
-method parameters using ``Reflection`` (a limitation in PHP). To work around
-this, you can explicitly declare method parameters for an internal class using
-``/Mockery/Configuration::setInternalClassMethodParamMap()``.
-
-Here's an example using ``MongoCollection::insert()``. ``MongoCollection`` is
-an internal class offered by the mongo extension from PECL. Its ``insert()``
-method accepts an array of data as the first parameter, and an optional
-options array as the second parameter. The original data array is updated
-(i.e. when a ``insert()`` pass-by-reference parameter) to include a new
-``_id`` field. We can mock this behaviour using a configured parameter map (to
-tell Mockery to expect a pass by reference parameter) and a ``Closure``
-attached to the expected method parameter to be updated.
-
-Here's a PHPUnit unit test verifying that this pass-by-reference behaviour is
-preserved:
-
-.. code-block:: php
-
- public function testCanOverrideExpectedParametersOfInternalPHPClassesToPreserveRefs()
- {
- \Mockery::getConfiguration()->setInternalClassMethodParamMap(
- 'MongoCollection',
- 'insert',
- array('&$data', '$options = array()')
- );
- $m = \Mockery::mock('MongoCollection');
- $m->shouldReceive('insert')->with(
- \Mockery::on(function(&$data) {
- if (!is_array($data)) return false;
- $data['_id'] = 123;
- return true;
- }),
- \Mockery::any()
- );
-
- $data = array('a'=>1,'b'=>2);
- $m->insert($data);
-
- $this->assertTrue(isset($data['_id']));
- $this->assertEquals(123, $data['_id']);
-
- \Mockery::resetContainer();
- }
diff --git a/vendor/mockery/mockery/docs/reference/phpunit_integration.rst b/vendor/mockery/mockery/docs/reference/phpunit_integration.rst
deleted file mode 100644
index ea8eb46931c..00000000000
--- a/vendor/mockery/mockery/docs/reference/phpunit_integration.rst
+++ /dev/null
@@ -1,110 +0,0 @@
-.. index::
- single: PHPUnit Integration
-
-PHPUnit Integration
-===================
-
-Mockery was designed as a simple-to-use *standalone* mock object framework, so
-its need for integration with any testing framework is entirely optional. To
-integrate Mockery, you just need to define a ``tearDown()`` method for your
-tests containing the following (you may use a shorter ``\Mockery`` namespace
-alias):
-
-.. code-block:: php
-
- public function tearDown() {
- \Mockery::close();
- }
-
-This static call cleans up the Mockery container used by the current test, and
-run any verification tasks needed for your expectations.
-
-For some added brevity when it comes to using Mockery, you can also explicitly
-use the Mockery namespace with a shorter alias. For example:
-
-.. code-block:: php
-
- use \Mockery as m;
-
- class SimpleTest extends PHPUnit_Framework_TestCase
- {
- public function testSimpleMock() {
- $mock = m::mock('simplemock');
- $mock->shouldReceive('foo')->with(5, m::any())->once()->andReturn(10);
-
- $this->assertEquals(10, $mock->foo(5));
- }
-
- public function tearDown() {
- m::close();
- }
- }
-
-Mockery ships with an autoloader so you don't need to litter your tests with
-``require_once()`` calls. To use it, ensure Mockery is on your
-``include_path`` and add the following to your test suite's ``Bootstrap.php``
-or ``TestHelper.php`` file:
-
-.. code-block:: php
-
- require_once 'Mockery/Loader.php';
- require_once 'Hamcrest/Hamcrest.php';
-
- $loader = new \Mockery\Loader;
- $loader->register();
-
-If you are using Composer, you can simplify this to just including the
-Composer generated autoloader file:
-
-.. code-block:: php
-
- require __DIR__ . '/../vendor/autoload.php'; // assuming vendor is one directory up
-
-.. caution::
-
- Prior to Hamcrest 1.0.0, the ``Hamcrest.php`` file name had a small "h"
- (i.e. ``hamcrest.php``). If upgrading Hamcrest to 1.0.0 remember to check
- the file name is updated for all your projects.)
-
-To integrate Mockery into PHPUnit and avoid having to call the close method
-and have Mockery remove itself from code coverage reports, use this in you
-suite:
-
-.. code-block:: php
-
- // Create Suite
- $suite = new PHPUnit_Framework_TestSuite();
-
- // Create a result listener or add it
- $result = new PHPUnit_Framework_TestResult();
- $result->addListener(new \Mockery\Adapter\Phpunit\TestListener());
-
- // Run the tests.
- $suite->run($result);
-
-If you are using PHPUnit's XML configuration approach, you can include the
-following to load the ``TestListener``:
-
-.. code-block:: xml
-
-
-
-
-
-Make sure Composer's or Mockery's autoloader is present in the bootstrap file
-or you will need to also define a "file" attribute pointing to the file of the
-above ``TestListener`` class.
-
-.. caution::
-
- PHPUnit provides a functionality that allows
- `tests to run in a separated process `_,
- to ensure better isolation. Mockery verifies the mocks expectations using the
- ``Mockery::close()`` method, and provides a PHPUnit listener, that automatically
- calls this method for you after every test.
-
- However, this listener is not called in the right process when using PHPUnit's process
- isolation, resulting in expectations that might not be respected, but without raising
- any ``Mockery\Exception``. To avoid this, you cannot rely on the supplied Mockery PHPUnit
- ``TestListener``, and you need to explicitly calls ``Mockery::close``. The easiest solution
- to include this call in the ``tearDown()`` method, as explained previously.
diff --git a/vendor/mockery/mockery/docs/reference/public_properties.rst b/vendor/mockery/mockery/docs/reference/public_properties.rst
deleted file mode 100644
index 209f1bf01d5..00000000000
--- a/vendor/mockery/mockery/docs/reference/public_properties.rst
+++ /dev/null
@@ -1,16 +0,0 @@
-.. index::
- single: Mocking; Public Properties
-
-Mocking Public Properties
-=========================
-
-Mockery allows you to mock properties in several ways. The simplest is that
-you can simply set a public property and value on any mock object. The second
-is that you can use the expectation methods ``set()`` and ``andSet()`` to set
-property values if that expectation is ever met.
-
-You should note that, in general, Mockery does not support mocking any magic
-methods since these are generally not considered a public API (and besides
-they are a PITA to differentiate when you badly need them for mocking!). So
-please mock virtual properties (those relying on ``__get()`` and ``__set()``)
-as if they were actually declared on the class.
diff --git a/vendor/mockery/mockery/docs/reference/public_static_properties.rst b/vendor/mockery/mockery/docs/reference/public_static_properties.rst
deleted file mode 100644
index 3079c8b74ac..00000000000
--- a/vendor/mockery/mockery/docs/reference/public_static_properties.rst
+++ /dev/null
@@ -1,12 +0,0 @@
-.. index::
- single: Mocking; Public Static Methods
-
-Mocking Public Static Methods
-=============================
-
-Static methods are not called on real objects, so normal mock objects can't
-mock them. Mockery supports class aliased mocks, mocks representing a class
-name which would normally be loaded (via autoloading or a require statement)
-in the system under test. These aliases block that loading (unless via a
-require statement - so please use autoloading!) and allow Mockery to intercept
-static method calls and add expectations for them.
diff --git a/vendor/mockery/mockery/docs/reference/quick_examples.rst b/vendor/mockery/mockery/docs/reference/quick_examples.rst
deleted file mode 100644
index f68736b8b96..00000000000
--- a/vendor/mockery/mockery/docs/reference/quick_examples.rst
+++ /dev/null
@@ -1,130 +0,0 @@
-.. index::
- single: Reference; Examples
-
-Quick Examples
-==============
-
-Create a mock object to return a sequence of values from a set of method
-calls.
-
-.. code-block:: php
-
- class SimpleTest extends PHPUnit_Framework_TestCase
- {
-
- public function tearDown()
- {
- \Mockery::close();
- }
-
- public function testSimpleMock()
- {
- $mock = \Mockery::mock(array('pi' => 3.1416, 'e' => 2.71));
- $this->assertEquals(3.1416, $mock->pi());
- $this->assertEquals(2.71, $mock->e());
- }
-
- }
-
-Create a mock object which returns a self-chaining Undefined object for a
-method call.
-
-.. code-block:: php
-
- use \Mockery as m;
-
- class UndefinedTest extends PHPUnit_Framework_TestCase
- {
-
- public function tearDown()
- {
- m::close();
- }
-
- public function testUndefinedValues()
- {
- $mock = m::mock('mymock');
- $mock->shouldReceive('divideBy')->with(0)->andReturnUndefined();
- $this->assertTrue($mock->divideBy(0) instanceof \Mockery\Undefined);
- }
-
- }
-
-Creates a mock object which multiple query calls and a single update call.
-
-.. code-block:: php
-
- use \Mockery as m;
-
- class DbTest extends PHPUnit_Framework_TestCase
- {
-
- public function tearDown()
- {
- m::close();
- }
-
- public function testDbAdapter()
- {
- $mock = m::mock('db');
- $mock->shouldReceive('query')->andReturn(1, 2, 3);
- $mock->shouldReceive('update')->with(5)->andReturn(NULL)->once();
-
- // ... test code here using the mock
- }
-
- }
-
-Expect all queries to be executed before any updates.
-
-.. code-block:: php
-
- use \Mockery as m;
-
- class DbTest extends PHPUnit_Framework_TestCase
- {
-
- public function tearDown()
- {
- m::close();
- }
-
- public function testQueryAndUpdateOrder()
- {
- $mock = m::mock('db');
- $mock->shouldReceive('query')->andReturn(1, 2, 3)->ordered();
- $mock->shouldReceive('update')->andReturn(NULL)->once()->ordered();
-
- // ... test code here using the mock
- }
-
- }
-
-Create a mock object where all queries occur after startup, but before finish,
-and where queries are expected with several different params.
-
-.. code-block:: php
-
- use \Mockery as m;
-
- class DbTest extends PHPUnit_Framework_TestCase
- {
-
- public function tearDown()
- {
- m::close();
- }
-
- public function testOrderedQueries()
- {
- $db = m::mock('db');
- $db->shouldReceive('startup')->once()->ordered();
- $db->shouldReceive('query')->with('CPWR')->andReturn(12.3)->once()->ordered('queries');
- $db->shouldReceive('query')->with('MSFT')->andReturn(10.0)->once()->ordered('queries');
- $db->shouldReceive('query')->with("/^....$/")->andReturn(3.3)->atLeast()->once()->ordered('queries');
- $db->shouldReceive('finish')->once()->ordered();
-
- // ... test code here using the mock
- }
-
- }
diff --git a/vendor/mockery/mockery/docs/reference/startup_methods.rst b/vendor/mockery/mockery/docs/reference/startup_methods.rst
deleted file mode 100644
index 334a98ae086..00000000000
--- a/vendor/mockery/mockery/docs/reference/startup_methods.rst
+++ /dev/null
@@ -1,230 +0,0 @@
-.. index::
- single: Reference; Quick Reference
-
-Quick Reference
-===============
-
-Mockery implements a shorthand API when creating a mock. Here's a sampling of
-the possible startup methods.
-
-.. code-block:: php
-
- $mock = \Mockery::mock('foo');
-
-Creates a mock object named "foo". In this case, "foo" is a name (not
-necessarily a class name) used as a simple identifier when raising exceptions.
-This creates a mock object of type ``\Mockery\Mock`` and is the loosest form
-of mock possible.
-
-.. code-block:: php
-
- $mock = \Mockery::mock(array('foo'=>1,'bar'=>2));
-
-Creates an mock object named unknown since we passed no name. However we did
-pass an expectation array, a quick method of setting up methods to expect with
-their return values.
-
-.. code-block:: php
-
- $mock = \Mockery::mock('foo', array('foo'=>1,'bar'=>2));
-
-Similar to the previous examples and all examples going forward, expectation
-arrays can be passed for all mock objects as the second parameter to
-``mock()``.
-
-.. code-block:: php
-
- $mock = \Mockery::mock('foo', function($mock) {
- $mock->shouldReceive(method_name);
- });
-
-In addition to expectation arrays, you can also pass in a closure which
-contains reusable expectations. This can be passed as the second parameter, or
-as the third parameter if partnered with an expectation array. This is one
-method for creating reusable mock expectations.
-
-.. code-block:: php
-
- $mock = \Mockery::mock('stdClass');
-
-Creates a mock identical to a named mock, except the name is an actual class
-name. Creates a simple mock as previous examples show, except the mock object
-will inherit the class type (via inheritance), i.e. it will pass type hints or
-instanceof evaluations for stdClass. Useful where a mock object must be of a
-specific type.
-
-.. code-block:: php
-
- $mock = \Mockery::mock('FooInterface');
-
-You can create mock objects based on any concrete class, abstract class or
-even an interface. Again, the primary purpose is to ensure the mock object
-inherits a specific type for type hinting. There is an exception in that
-classes marked final, or with methods marked final, cannot be mocked fully. In
-these cases a partial mock (explained later) must be utilised.
-
-.. code-block:: php
-
- $mock = \Mockery::mock('alias:MyNamespace\MyClass');
-
-Prefixing the valid name of a class (which is NOT currently loaded) with
-"alias:" will generate an "alias mock". Alias mocks create a class alias with
-the given classname to stdClass and are generally used to enable the mocking
-of public static methods. Expectations set on the new mock object which refer
-to static methods will be used by all static calls to this class.
-
-.. code-block:: php
-
- $mock = \Mockery::mock('overload:MyNamespace\MyClass');
-
-Prefixing the valid name of a class (which is NOT currently loaded) with
-"overload:" will generate an alias mock (as with "alias:") except that created
-new instances of that class will import any expectations set on the origin
-mock (``$mock``). The origin mock is never verified since it's used an
-expectation store for new instances. For this purpose we use the term
-"instance mock" to differentiate it from the simpler "alias mock".
-
-.. note::
-
- Using alias/instance mocks across more than one test will generate a fatal
- error since you can't have two classes of the same name. To avoid this,
- run each test of this kind in a separate PHP process (which is supported
- out of the box by both PHPUnit and PHPT).
-
-.. code-block:: php
-
- $mock = \Mockery::mock('stdClass, MyInterface1, MyInterface2');
-
-The first argument can also accept a list of interfaces that the mock object
-must implement, optionally including no more than one existing class to be
-based on. The class name doesn't need to be the first member of the list but
-it's a friendly convention to use for readability. All subsequent arguments
-remain unchanged from previous examples.
-
-If the given class does not exist, you must define and include it beforehand
-or a ``\Mockery\Exception`` will be thrown.
-
-.. code-block:: php
-
- $mock = \Mockery::mock('MyNamespace\MyClass[foo,bar]');
-
-The syntax above tells Mockery to partially mock the ``MyNamespace\MyClass``
-class, by mocking the ``foo()`` and ``bar()`` methods only. Any other method
-will be not be overridden by Mockery. This traditional form of "partial mock"
-can be applied to any class or abstract class (e.g. mocking abstract methods
-where a concrete implementation does not exist yet). If you attempt to partial
-mock a method marked final, it will actually be ignored in that instance
-leaving the final method untouched. This is necessary since mocking of final
-methods is, by definition in PHP, impossible.
-
-Please refer to ":doc:`partial_mocks`" for a detailed explanation on how to
-create Partial Mocks in Mockery.
-
-.. code-block:: php
-
- $mock = \Mockery::mock("MyNamespace\MyClass[foo]", array($arg1, $arg2));
-
-If Mockery encounters an indexed array as the second or third argument, it
-will assume they are constructor parameters and pass them when constructing
-the mock object. The syntax above will create a new partial mock, particularly
-useful if method ``bar`` calls method ``foo`` internally with
-``$this->foo()``.
-
-.. code-block:: php
-
- $mock = \Mockery::mock(new Foo);
-
-Passing any real object into Mockery will create a Proxied Partial Mock. This
-can be useful if real partials are impossible, e.g. a final class or class
-where you absolutely must override a method marked final. Since you can
-already create a concrete object, so all we need to do is selectively override
-a subset of existing methods (or add non-existing methods!) for our
-expectations.
-
-A little revision: All mock methods accept the class, object or alias name to
-be mocked as the first parameter. The second parameter can be an expectation
-array of methods and their return values, or an expectation closure (which can
-be the third param if used in conjunction with an expectation array).
-
-.. code-block:: php
-
- \Mockery::self()
-
-At times, you will discover that expectations on a mock include methods which
-need to return the same mock object (e.g. a common case when designing a
-Domain Specific Language (DSL) such as the one Mockery itself uses!). To
-facilitate this, calling ``\Mockery::self()`` will always return the last Mock
-Object created by calling ``\Mockery::mock()``. For example:
-
-.. code-block:: php
-
- $mock = \Mockery::mock('BazIterator')
- ->shouldReceive('next')
- ->andReturn(\Mockery::self())
- ->mock();
-
-The above class being mocked, as the ``next()`` method suggests, is an
-iterator. In many cases, you can replace all the iterated elements (since they
-are the same type many times) with just the one mock object which is
-programmed to act as discrete iterated elements.
-
-.. code-block:: php
-
- $mock = \Mockery::namedMock('MyClassName', 'DateTime');
-
-The ``namedMock`` method will generate a class called by the first argument,
-so in this example ``MyClassName``. The rest of the arguments are treat in the
-same way as the ``mock`` method, so again, this example would create a class
-called ``MyClassName`` that extends ``DateTime``.
-
-Named mocks are quite an edge case, but they can be useful when code depends
-on the ``__CLASS__`` magic constant, or when you need two derivatives of an
-abstract type, that are actually different classes.
-
-.. caution::
-
- You can only create a named mock once, any subsequent calls to
- ``namedMock``, with different arguments are likely to cause exceptions.
-
-Behaviour Modifiers
--------------------
-
-When creating a mock object, you may wish to use some commonly preferred
-behaviours that are not the default in Mockery.
-
-.. code-block:: php
-
- \Mockery::mock('MyClass')->shouldIgnoreMissing()
-
-The use of the ``shouldIgnoreMissing()`` behaviour modifier will label this
-mock object as a Passive Mock. In such a mock object, calls to methods which
-are not covered by expectations will return ``null`` instead of the usual
-complaining about there being no expectation matching the call.
-
-You can optionally prefer to return an object of type ``\Mockery\Undefined``
-(i.e. a ``null`` object) (which was the 0.7.2 behaviour) by using an
-additional modifier:
-
-.. code-block:: php
-
- \Mockery::mock('MyClass')->shouldIgnoreMissing()->asUndefined()
-
-The returned object is nothing more than a placeholder so if, by some act of
-fate, it's erroneously used somewhere it shouldn't it will likely not pass a
-logic check.
-
-.. code-block:: php
-
- \Mockery::mock('MyClass')->makePartial()
-
-also
-
-.. code-block:: php
-
- \Mockery::mock('MyClass')->shouldDeferMissing()
-
-Known as a Passive Partial Mock (not to be confused with real partial mock
-objects discussed later), this form of mock object will defer all methods not
-subject to an expectation to the parent class of the mock, i.e. ``MyClass``.
-Whereas the previous ``shouldIgnoreMissing()`` returned ``null``, this
-behaviour simply calls the parent's matching method.
diff --git a/vendor/mockery/mockery/examples/starship/Bootstrap.php b/vendor/mockery/mockery/examples/starship/Bootstrap.php
deleted file mode 100644
index 93b0af9a4aa..00000000000
--- a/vendor/mockery/mockery/examples/starship/Bootstrap.php
+++ /dev/null
@@ -1,11 +0,0 @@
-register();
diff --git a/vendor/mockery/mockery/examples/starship/Starship.php b/vendor/mockery/mockery/examples/starship/Starship.php
deleted file mode 100644
index ca26ef105fd..00000000000
--- a/vendor/mockery/mockery/examples/starship/Starship.php
+++ /dev/null
@@ -1,24 +0,0 @@
-_engineering = $engineering;
- }
-
- public function enterOrbit()
- {
- $this->_engineering->disengageWarp();
- $this->_engineering->runDiagnosticLevel(5);
- $this->_engineering->divertPower(0.40, 'sensors');
- $this->_engineering->divertPower(0.30, 'auxengines');
- $this->_engineering->runDiagnosticLevel(1);
-
- // We can add more runDiagnosticLevel() calls without failing the test
- // anywhere above since they are unordered.
- }
-}
diff --git a/vendor/mockery/mockery/examples/starship/StarshipTest.php b/vendor/mockery/mockery/examples/starship/StarshipTest.php
deleted file mode 100644
index a85def5d7b5..00000000000
--- a/vendor/mockery/mockery/examples/starship/StarshipTest.php
+++ /dev/null
@@ -1,21 +0,0 @@
-shouldReceive('disengageWarp')->once()->ordered();
- $mock->shouldReceive('divertPower')->with(0.40, 'sensors')->once()->ordered();
- $mock->shouldReceive('divertPower')->with(0.30, 'auxengines')->once()->ordered();
- $mock->shouldReceive('runDiagnosticLevel')->with(1)->once()->ordered();
- $mock->shouldReceive('runDiagnosticLevel')->with(M::type('int'))->zeroOrMoreTimes();
-
- $starship = new Starship($mock);
- $starship->enterOrbit();
- }
-}
diff --git a/vendor/mockery/mockery/library/Mockery.php b/vendor/mockery/mockery/library/Mockery.php
deleted file mode 100644
index f2c6b56cdc9..00000000000
--- a/vendor/mockery/mockery/library/Mockery.php
+++ /dev/null
@@ -1,759 +0,0 @@
-shouldIgnoreMissing();
- }
-
- /**
- * @return \Mockery\MockInterface
- */
- public static function instanceMock()
- {
- $args = func_get_args();
-
- return call_user_func_array(array(self::getContainer(), 'mock'), $args);
- }
-
- /**
- * Static shortcut to \Mockery\Container::mock(), first argument names the mock.
- *
- * @return \Mockery\MockInterface
- */
- public static function namedMock()
- {
- $args = func_get_args();
- $name = array_shift($args);
-
- $builder = new MockConfigurationBuilder();
- $builder->setName($name);
-
- array_unshift($args, $builder);
-
- return call_user_func_array(array(self::getContainer(), 'mock'), $args);
- }
-
- /**
- * Static shortcut to \Mockery\Container::self().
- *
- * @throws LogicException
- *
- * @return \Mockery\MockInterface
- */
- public static function self()
- {
- if (is_null(self::$_container)) {
- throw new \LogicException('You have not declared any mocks yet');
- }
-
- return self::$_container->self();
- }
-
- /**
- * Static shortcut to closing up and verifying all mocks in the global
- * container, and resetting the container static variable to null.
- *
- * @return void
- */
- public static function close()
- {
- foreach (self::$_filesToCleanUp as $fileName) {
- @unlink($fileName);
- }
- self::$_filesToCleanUp = array();
-
- if (is_null(self::$_container)) {
- return;
- }
-
- self::$_container->mockery_teardown();
- self::$_container->mockery_close();
- self::$_container = null;
- }
-
- /**
- * Static fetching of a mock associated with a name or explicit class poser.
- *
- * @param $name
- *
- * @return \Mockery\Mock
- */
- public static function fetchMock($name)
- {
- return self::$_container->fetchMock($name);
- }
-
- /**
- * Get the container.
- */
- public static function getContainer()
- {
- if (is_null(self::$_container)) {
- self::$_container = new Mockery\Container(self::getGenerator(), self::getLoader());
- }
-
- return self::$_container;
- }
-
- /**
- * @param \Mockery\Generator\Generator $generator
- */
- public static function setGenerator(Generator $generator)
- {
- self::$_generator = $generator;
- }
-
- public static function getGenerator()
- {
- if (is_null(self::$_generator)) {
- self::$_generator = self::getDefaultGenerator();
- }
-
- return self::$_generator;
- }
-
- public static function getDefaultGenerator()
- {
- $generator = new StringManipulationGenerator(array(
- new CallTypeHintPass(),
- new ClassPass(),
- new ClassNamePass(),
- new InstanceMockPass(),
- new InterfacePass(),
- new MethodDefinitionPass(),
- new RemoveUnserializeForInternalSerializableClassesPass(),
- new RemoveBuiltinMethodsThatAreFinalPass(),
- ));
-
- return new CachingGenerator($generator);
- }
-
- /**
- * @param Loader $loader
- */
- public static function setLoader(Loader $loader)
- {
- self::$_loader = $loader;
- }
-
- /**
- * @return Loader
- */
- public static function getLoader()
- {
- if (is_null(self::$_loader)) {
- self::$_loader = self::getDefaultLoader();
- }
-
- return self::$_loader;
- }
-
- /**
- * @return EvalLoader
- */
- public static function getDefaultLoader()
- {
- return new EvalLoader();
- }
-
- /**
- * Set the container.
- *
- * @param \Mockery\Container $container
- *
- * @return \Mockery\Container
- */
- public static function setContainer(Mockery\Container $container)
- {
- return self::$_container = $container;
- }
-
- /**
- * Reset the container to null.
- */
- public static function resetContainer()
- {
- self::$_container = null;
- }
-
- /**
- * Return instance of ANY matcher.
- *
- * @return \Mockery\Matcher\Any
- */
- public static function any()
- {
- return new \Mockery\Matcher\Any();
- }
-
- /**
- * Return instance of TYPE matcher.
- *
- * @param $expected
- *
- * @return \Mockery\Matcher\Type
- */
- public static function type($expected)
- {
- return new \Mockery\Matcher\Type($expected);
- }
-
- /**
- * Return instance of DUCKTYPE matcher.
- *
- * @return \Mockery\Matcher\Ducktype
- */
- public static function ducktype()
- {
- return new \Mockery\Matcher\Ducktype(func_get_args());
- }
-
- /**
- * Return instance of SUBSET matcher.
- *
- * @param array $part
- *
- * @return \Mockery\Matcher\Subset
- */
- public static function subset(array $part)
- {
- return new \Mockery\Matcher\Subset($part);
- }
-
- /**
- * Return instance of CONTAINS matcher.
- *
- * @return \Mockery\Matcher\Contains
- */
- public static function contains()
- {
- return new \Mockery\Matcher\Contains(func_get_args());
- }
-
- /**
- * Return instance of HASKEY matcher.
- *
- * @param $key
- *
- * @return \Mockery\Matcher\HasKey
- */
- public static function hasKey($key)
- {
- return new \Mockery\Matcher\HasKey($key);
- }
-
- /**
- * Return instance of HASVALUE matcher.
- *
- * @param $val
- *
- * @return \Mockery\Matcher\HasValue
- */
- public static function hasValue($val)
- {
- return new \Mockery\Matcher\HasValue($val);
- }
-
- /**
- * Return instance of CLOSURE matcher.
- *
- * @param $closure
- *
- * @return \Mockery\Matcher\Closure
- */
- public static function on($closure)
- {
- return new \Mockery\Matcher\Closure($closure);
- }
-
- /**
- * Return instance of MUSTBE matcher.
- *
- * @param $expected
- *
- * @return \Mockery\Matcher\MustBe
- */
- public static function mustBe($expected)
- {
- return new \Mockery\Matcher\MustBe($expected);
- }
-
- /**
- * Return instance of NOT matcher.
- *
- * @param $expected
- *
- * @return \Mockery\Matcher\Not
- */
- public static function not($expected)
- {
- return new \Mockery\Matcher\Not($expected);
- }
-
- /**
- * Return instance of ANYOF matcher.
- *
- * @return \Mockery\Matcher\AnyOf
- */
- public static function anyOf()
- {
- return new \Mockery\Matcher\AnyOf(func_get_args());
- }
-
- /**
- * Return instance of NOTANYOF matcher.
- *
- * @return \Mockery\Matcher\NotAnyOf
- */
- public static function notAnyOf()
- {
- return new \Mockery\Matcher\NotAnyOf(func_get_args());
- }
-
- /**
- * Get the global configuration container.
- */
- public static function getConfiguration()
- {
- if (is_null(self::$_config)) {
- self::$_config = new \Mockery\Configuration();
- }
-
- return self::$_config;
- }
-
- /**
- * Utility method to format method name and arguments into a string.
- *
- * @param string $method
- * @param array $arguments
- *
- * @return string
- */
- public static function formatArgs($method, array $arguments = null)
- {
- if (is_null($arguments)) {
- return $method . '()';
- }
-
- $formattedArguments = array();
- foreach ($arguments as $argument) {
- $formattedArguments[] = self::formatArgument($argument);
- }
-
- return $method . '(' . implode(', ', $formattedArguments) . ')';
- }
-
- private static function formatArgument($argument, $depth = 0)
- {
- if (is_object($argument)) {
- return 'object(' . get_class($argument) . ')';
- }
-
- if (is_int($argument) || is_float($argument)) {
- return $argument;
- }
-
- if (is_array($argument)) {
- if ($depth === 1) {
- $argument = 'array(...)';
- } else {
- $sample = array();
- foreach ($argument as $key => $value) {
- $sample[$key] = self::formatArgument($value, $depth + 1);
- }
- $argument = preg_replace("{\s}", '', var_export($sample, true));
- }
-
- return ((strlen($argument) > 1000) ? substr($argument, 0, 1000).'...)' : $argument);
- }
-
- if (is_bool($argument)) {
- return $argument ? 'true' : 'false';
- }
-
- if (is_resource($argument)) {
- return 'resource(...)';
- }
-
- if (is_null($argument)) {
- return 'NULL';
- }
-
- $argument = (string) $argument;
-
- return $depth === 0 ? '"' . $argument . '"' : $argument;
- }
-
- /**
- * Utility function to format objects to printable arrays.
- *
- * @param array $objects
- *
- * @return string
- */
- public static function formatObjects(array $objects = null)
- {
- static $formatting;
-
- if ($formatting) {
- return '[Recursion]';
- }
-
- if (is_null($objects)) {
- return '';
- }
-
- $objects = array_filter($objects, 'is_object');
- if (empty($objects)) {
- return '';
- }
-
- $formatting = true;
- $parts = array();
-
- foreach ($objects as $object) {
- $parts[get_class($object)] = self::objectToArray($object);
- }
-
- $formatting = false;
-
- return 'Objects: ( ' . var_export($parts, true) . ')';
- }
-
- /**
- * Utility function to turn public properties and public get* and is* method values into an array.
- *
- * @param $object
- * @param int $nesting
- *
- * @return array
- */
- private static function objectToArray($object, $nesting = 3)
- {
- if ($nesting == 0) {
- return array('...');
- }
-
- return array(
- 'class' => get_class($object),
- 'properties' => self::extractInstancePublicProperties($object, $nesting),
- 'getters' => self::extractGetters($object, $nesting)
- );
- }
-
- /**
- * Returns all public instance properties.
- *
- * @param $object
- * @param $nesting
- *
- * @return array
- */
- private static function extractInstancePublicProperties($object, $nesting)
- {
- $reflection = new \ReflectionClass(get_class($object));
- $properties = $reflection->getProperties(\ReflectionProperty::IS_PUBLIC);
- $cleanedProperties = array();
-
- foreach ($properties as $publicProperty) {
- if (!$publicProperty->isStatic()) {
- $name = $publicProperty->getName();
- $cleanedProperties[$name] = self::cleanupNesting($object->$name, $nesting);
- }
- }
-
- return $cleanedProperties;
- }
-
- /**
- * Returns all object getters.
- *
- * @param $object
- * @param $nesting
- *
- * @return array
- */
- private static function extractGetters($object, $nesting)
- {
- $reflection = new \ReflectionClass(get_class($object));
- $publicMethods = $reflection->getMethods(\ReflectionMethod::IS_PUBLIC);
- $getters = array();
-
- foreach ($publicMethods as $publicMethod) {
- $name = $publicMethod->getName();
- $irrelevantName = (substr($name, 0, 3) !== 'get' && substr($name, 0, 2) !== 'is');
- $isStatic = $publicMethod->isStatic();
- $numberOfParameters = $publicMethod->getNumberOfParameters();
-
- if ($irrelevantName || $numberOfParameters != 0 || $isStatic) {
- continue;
- }
-
- try {
- $getters[$name] = self::cleanupNesting($object->$name(), $nesting);
- } catch (\Exception $e) {
- $getters[$name] = '!! ' . get_class($e) . ': ' . $e->getMessage() . ' !!';
- }
- }
-
- return $getters;
- }
-
- private static function cleanupNesting($argument, $nesting)
- {
- if (is_object($argument)) {
- $object = self::objectToArray($argument, $nesting - 1);
- $object['class'] = get_class($argument);
-
- return $object;
- }
-
- if (is_array($argument)) {
- return self::cleanupArray($argument, $nesting - 1);
- }
-
- return $argument;
- }
-
- private static function cleanupArray($argument, $nesting = 3)
- {
- if ($nesting == 0) {
- return '...';
- }
-
- foreach ($argument as $key => $value) {
- if (is_array($value)) {
- $argument[$key] = self::cleanupArray($value, $nesting - 1);
- } elseif (is_object($value)) {
- $argument[$key] = self::objectToArray($value, $nesting - 1);
- }
- }
-
- return $argument;
- }
-
- /**
- * Utility function to parse shouldReceive() arguments and generate
- * expectations from such as needed.
- *
- * @param Mockery\MockInterface $mock
- * @param array $args
- * @param callable $add
- * @return \Mockery\CompositeExpectation
- */
- public static function parseShouldReturnArgs(\Mockery\MockInterface $mock, $args, $add)
- {
- $composite = new \Mockery\CompositeExpectation();
-
- foreach ($args as $arg) {
- if (is_array($arg)) {
- foreach ($arg as $k => $v) {
- $expectation = self::buildDemeterChain($mock, $k, $add)->andReturn($v);
- $composite->add($expectation);
- }
- } elseif (is_string($arg)) {
- $expectation = self::buildDemeterChain($mock, $arg, $add);
- $composite->add($expectation);
- }
- }
-
- return $composite;
- }
-
- /**
- * Sets up expectations on the members of the CompositeExpectation and
- * builds up any demeter chain that was passed to shouldReceive.
- *
- * @param \Mockery\MockInterface $mock
- * @param string $arg
- * @param callable $add
- * @throws Mockery\Exception
- * @return \Mockery\ExpectationDirector
- */
- protected static function buildDemeterChain(\Mockery\MockInterface $mock, $arg, $add)
- {
- /** @var Mockery\Container $container */
- $container = $mock->mockery_getContainer();
- $methodNames = explode('->', $arg);
- reset($methodNames);
-
- if (!\Mockery::getConfiguration()->mockingNonExistentMethodsAllowed()
- && !$mock->mockery_isAnonymous()
- && !in_array(current($methodNames), $mock->mockery_getMockableMethods())
- ) {
- throw new \Mockery\Exception(
- 'Mockery\'s configuration currently forbids mocking the method '
- . current($methodNames) . ' as it does not exist on the class or object '
- . 'being mocked'
- );
- }
-
- /** @var ExpectationInterface|null $expectations */
- $expectations = null;
-
- /** @var Callable $nextExp */
- $nextExp = function ($method) use ($add) {
- return $add($method);
- };
-
- while (true) {
- $method = array_shift($methodNames);
- $expectations = $mock->mockery_getExpectationsFor($method);
-
- if (is_null($expectations) || self::noMoreElementsInChain($methodNames)) {
- $expectations = $nextExp($method);
- if (self::noMoreElementsInChain($methodNames)) {
- break;
- }
-
- $mock = self::getNewDemeterMock($container, $method, $expectations);
- } else {
- $demeterMockKey = $container->getKeyOfDemeterMockFor($method);
- if ($demeterMockKey) {
- $mock = self::getExistingDemeterMock($container, $demeterMockKey);
- }
- }
-
- $nextExp = function ($n) use ($mock) {
- return $mock->shouldReceive($n);
- };
- }
-
- return $expectations;
- }
-
- /**
- * @param \Mockery\Container $container
- * @param string $method
- * @param Mockery\ExpectationInterface $exp
- *
- * @return \Mockery\Mock
- */
- private static function getNewDemeterMock(Mockery\Container $container,
- $method,
- Mockery\ExpectationInterface $exp
- ) {
- $mock = $container->mock('demeter_' . $method);
- $exp->andReturn($mock);
-
- return $mock;
- }
-
- /**
- * @param \Mockery\Container $container
- * @param string $demeterMockKey
- *
- * @return mixed
- */
- private static function getExistingDemeterMock(Mockery\Container $container, $demeterMockKey)
- {
- $mocks = $container->getMocks();
- $mock = $mocks[$demeterMockKey];
-
- return $mock;
- }
-
- /**
- * @param array $methodNames
- *
- * @return bool
- */
- private static function noMoreElementsInChain(array $methodNames)
- {
- return empty($methodNames);
- }
-
- /**
- * Register a file to be deleted on tearDown.
- *
- * @param string $fileName
- */
- public static function registerFileForCleanUp($fileName)
- {
- self::$_filesToCleanUp[] = $fileName;
- }
-}
diff --git a/vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryPHPUnitIntegration.php b/vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryPHPUnitIntegration.php
deleted file mode 100644
index aefc6d3f274..00000000000
--- a/vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryPHPUnitIntegration.php
+++ /dev/null
@@ -1,26 +0,0 @@
-addToAssertionCount($container->mockery_getExpectationCount());
- }
-
- // Verify Mockery expectations.
- \Mockery::close();
- }
-}
diff --git a/vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryTestCase.php b/vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryTestCase.php
deleted file mode 100644
index acbba30443e..00000000000
--- a/vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryTestCase.php
+++ /dev/null
@@ -1,30 +0,0 @@
-addMockeryExpectationsToAssertionCount();
- $this->closeMockery();
-
- parent::assertPostConditions();
- }
-
- protected function addMockeryExpectationsToAssertionCount()
- {
- $container = Mockery::getContainer();
- if ($container != null) {
- $count = $container->mockery_getExpectationCount();
- $this->addToAssertionCount($count);
- }
- }
-
- protected function closeMockery()
- {
- Mockery::close();
- }
-}
diff --git a/vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/TestListener.php b/vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/TestListener.php
deleted file mode 100644
index 578d326258f..00000000000
--- a/vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/TestListener.php
+++ /dev/null
@@ -1,93 +0,0 @@
-mockery_getExpectationCount();
- $test->addToAssertionCount($expectation_count);
- }
- \Mockery::close();
- } catch (\Exception $e) {
- $result = $test->getTestResultObject();
- $result->addError($test, $e, $time);
- }
- }
-
- /**
- * Add Mockery files to PHPUnit's blacklist so they don't showup on coverage reports
- */
- public function startTestSuite(\PHPUnit_Framework_TestSuite $suite)
- {
- if (class_exists('\\PHP_CodeCoverage_Filter')
- && method_exists('\\PHP_CodeCoverage_Filter', 'getInstance')) {
- \PHP_CodeCoverage_Filter::getInstance()->addDirectoryToBlacklist(
- __DIR__.'/../../../Mockery/', '.php', '', 'PHPUNIT'
- );
-
- \PHP_CodeCoverage_Filter::getInstance()->addFileToBlacklist(__DIR__.'/../../../Mockery.php', 'PHPUNIT');
- }
- }
- /**
- * The Listening methods below are not required for Mockery
- */
- public function addError(\PHPUnit_Framework_Test $test, \Exception $e, $time)
- {
- }
-
- public function addFailure(\PHPUnit_Framework_Test $test, \PHPUnit_Framework_AssertionFailedError $e, $time)
- {
- }
-
- public function addIncompleteTest(\PHPUnit_Framework_Test $test, \Exception $e, $time)
- {
- }
-
- public function addSkippedTest(\PHPUnit_Framework_Test $test, \Exception $e, $time)
- {
- }
-
- public function addRiskyTest(\PHPUnit_Framework_Test $test, \Exception $e, $time)
- {
- }
-
- public function endTestSuite(\PHPUnit_Framework_TestSuite $suite)
- {
- }
-
- public function startTest(\PHPUnit_Framework_Test $test)
- {
- }
-}
diff --git a/vendor/mockery/mockery/library/Mockery/CompositeExpectation.php b/vendor/mockery/mockery/library/Mockery/CompositeExpectation.php
deleted file mode 100644
index 242d73b91a4..00000000000
--- a/vendor/mockery/mockery/library/Mockery/CompositeExpectation.php
+++ /dev/null
@@ -1,131 +0,0 @@
-_expectations[] = $expectation;
- }
-
- /**
- * @param mixed ...
- */
- public function andReturn()
- {
- return $this->__call(__FUNCTION__, func_get_args());
- }
-
- /**
- * Intercept any expectation calls and direct against all expectations
- *
- * @param string $method
- * @param array $args
- * @return self
- */
- public function __call($method, array $args)
- {
- foreach ($this->_expectations as $expectation) {
- call_user_func_array(array($expectation, $method), $args);
- }
- return $this;
- }
-
- /**
- * Return order number of the first expectation
- *
- * @return int
- */
- public function getOrderNumber()
- {
- reset($this->_expectations);
- $first = current($this->_expectations);
- return $first->getOrderNumber();
- }
-
- /**
- * Return the parent mock of the first expectation
- *
- * @return \Mockery\MockInterface
- */
- public function getMock()
- {
- reset($this->_expectations);
- $first = current($this->_expectations);
- return $first->getMock();
- }
-
- /**
- * Mockery API alias to getMock
- *
- * @return \Mockery\MockInterface
- */
- public function mock()
- {
- return $this->getMock();
- }
-
- /**
- * Starts a new expectation addition on the first mock which is the primary
- * target outside of a demeter chain
- *
- * @param mixed ...
- * @return \Mockery\Expectation
- */
- public function shouldReceive()
- {
- $args = func_get_args();
- reset($this->_expectations);
- $first = current($this->_expectations);
- return call_user_func_array(array($first->getMock(), 'shouldReceive'), $args);
- }
-
- /**
- * Return the string summary of this composite expectation
- *
- * @return string
- */
- public function __toString()
- {
- $return = '[';
- $parts = array();
- foreach ($this->_expectations as $exp) {
- $parts[] = (string) $exp;
- }
- $return .= implode(', ', $parts) . ']';
- return $return;
- }
-}
diff --git a/vendor/mockery/mockery/library/Mockery/Configuration.php b/vendor/mockery/mockery/library/Mockery/Configuration.php
deleted file mode 100644
index a6366b88e56..00000000000
--- a/vendor/mockery/mockery/library/Mockery/Configuration.php
+++ /dev/null
@@ -1,131 +0,0 @@
-_allowMockingNonExistentMethod = (bool) $flag;
- }
-
- /**
- * Return flag indicating whether mocking non-existent methods allowed
- *
- * @return bool
- */
- public function mockingNonExistentMethodsAllowed()
- {
- return $this->_allowMockingNonExistentMethod;
- }
-
- /**
- * Set boolean to allow/prevent unnecessary mocking of methods
- *
- * @param bool
- */
- public function allowMockingMethodsUnnecessarily($flag = true)
- {
- $this->_allowMockingMethodsUnnecessarily = (bool) $flag;
- }
-
- /**
- * Return flag indicating whether mocking non-existent methods allowed
- *
- * @return bool
- */
- public function mockingMethodsUnnecessarilyAllowed()
- {
- return $this->_allowMockingMethodsUnnecessarily;
- }
-
- /**
- * Set a parameter map (array of param signature strings) for the method
- * of an internal PHP class.
- *
- * @param string $class
- * @param string $method
- * @param array $map
- */
- public function setInternalClassMethodParamMap($class, $method, array $map)
- {
- if (!isset($this->_internalClassParamMap[strtolower($class)])) {
- $this->_internalClassParamMap[strtolower($class)] = array();
- }
- $this->_internalClassParamMap[strtolower($class)][strtolower($method)] = $map;
- }
-
- /**
- * Remove all overriden parameter maps from internal PHP classes.
- */
- public function resetInternalClassMethodParamMaps()
- {
- $this->_internalClassParamMap = array();
- }
-
- /**
- * Get the parameter map of an internal PHP class method
- *
- * @return array
- */
- public function getInternalClassMethodParamMap($class, $method)
- {
- if (isset($this->_internalClassParamMap[strtolower($class)][strtolower($method)])) {
- return $this->_internalClassParamMap[strtolower($class)][strtolower($method)];
- }
- }
-
- public function getInternalClassMethodParamMaps()
- {
- return $this->_internalClassParamMap;
- }
-}
diff --git a/vendor/mockery/mockery/library/Mockery/Container.php b/vendor/mockery/mockery/library/Mockery/Container.php
deleted file mode 100644
index d112266a191..00000000000
--- a/vendor/mockery/mockery/library/Mockery/Container.php
+++ /dev/null
@@ -1,524 +0,0 @@
-_generator = $generator ?: \Mockery::getDefaultGenerator();
- $this->_loader = $loader ?: \Mockery::getDefaultLoader();
- }
-
- /**
- * Generates a new mock object for this container
- *
- * I apologies in advance for this. A God Method just fits the API which
- * doesn't require differentiating between classes, interfaces, abstracts,
- * names or partials - just so long as it's something that can be mocked.
- * I'll refactor it one day so it's easier to follow.
- *
- * @throws Exception\RuntimeException
- * @throws Exception
- * @return \Mockery\Mock
- */
- public function mock()
- {
- $expectationClosure = null;
- $quickdefs = array();
- $constructorArgs = null;
- $blocks = array();
- $args = func_get_args();
-
- if (count($args) > 1) {
- $finalArg = end($args);
- reset($args);
- if (is_callable($finalArg) && is_object($finalArg)) {
- $expectationClosure = array_pop($args);
- }
- }
-
- $builder = new MockConfigurationBuilder();
-
- foreach ($args as $k => $arg) {
- if ($arg instanceof MockConfigurationBuilder) {
- $builder = $arg;
- unset($args[$k]);
- }
- }
- reset($args);
-
- $builder->setParameterOverrides(\Mockery::getConfiguration()->getInternalClassMethodParamMaps());
-
- while (count($args) > 0) {
- $arg = current($args);
- // check for multiple interfaces
- if (is_string($arg) && strpos($arg, ',') && !strpos($arg, ']')) {
- $interfaces = explode(',', str_replace(' ', '', $arg));
- foreach ($interfaces as $i) {
- if (!interface_exists($i, true) && !class_exists($i, true)) {
- throw new \Mockery\Exception(
- 'Class name follows the format for defining multiple'
- . ' interfaces, however one or more of the interfaces'
- . ' do not exist or are not included, or the base class'
- . ' (which you may omit from the mock definition) does not exist'
- );
- }
- }
- $builder->addTargets($interfaces);
- array_shift($args);
-
- continue;
- } elseif (is_string($arg) && substr($arg, 0, 6) == 'alias:') {
- $name = array_shift($args);
- $name = str_replace('alias:', '', $name);
- $builder->addTarget('stdClass');
- $builder->setName($name);
- continue;
- } elseif (is_string($arg) && substr($arg, 0, 9) == 'overload:') {
- $name = array_shift($args);
- $name = str_replace('overload:', '', $name);
- $builder->setInstanceMock(true);
- $builder->addTarget('stdClass');
- $builder->setName($name);
- continue;
- } elseif (is_string($arg) && substr($arg, strlen($arg)-1, 1) == ']') {
- $parts = explode('[', $arg);
- if (!class_exists($parts[0], true) && !interface_exists($parts[0], true)) {
- throw new \Mockery\Exception('Can only create a partial mock from'
- . ' an existing class or interface');
- }
- $class = $parts[0];
- $parts[1] = str_replace(' ', '', $parts[1]);
- $partialMethods = explode(',', strtolower(rtrim($parts[1], ']')));
- $builder->addTarget($class);
- $builder->setWhiteListedMethods($partialMethods);
- array_shift($args);
- continue;
- } elseif (is_string($arg) && (class_exists($arg, true) || interface_exists($arg, true))) {
- $class = array_shift($args);
- $builder->addTarget($class);
- continue;
- } elseif (is_string($arg)) {
- $class = array_shift($args);
- $builder->addTarget($class);
- continue;
- } elseif (is_object($arg)) {
- $partial = array_shift($args);
- $builder->addTarget($partial);
- continue;
- } elseif (is_array($arg) && !empty($arg) && array_keys($arg) !== range(0, count($arg) - 1)) {
- // if associative array
- if (array_key_exists(self::BLOCKS, $arg)) {
- $blocks = $arg[self::BLOCKS];
- }
- unset($arg[self::BLOCKS]);
- $quickdefs = array_shift($args);
- continue;
- } elseif (is_array($arg)) {
- $constructorArgs = array_shift($args);
- continue;
- }
-
- throw new \Mockery\Exception(
- 'Unable to parse arguments sent to '
- . get_class($this) . '::mock()'
- );
- }
-
- $builder->addBlackListedMethods($blocks);
-
- if (!is_null($constructorArgs)) {
- $builder->addBlackListedMethod("__construct"); // we need to pass through
- }
-
- if (!empty($partialMethods) && $constructorArgs === null) {
- $constructorArgs = array();
- }
-
- $config = $builder->getMockConfiguration();
-
- $this->checkForNamedMockClashes($config);
-
- $def = $this->getGenerator()->generate($config);
-
- if (class_exists($def->getClassName(), $attemptAutoload = false)) {
- $rfc = new \ReflectionClass($def->getClassName());
- if (!$rfc->implementsInterface("Mockery\MockInterface")) {
- throw new \Mockery\Exception\RuntimeException("Could not load mock {$def->getClassName()}, class already exists");
- }
- }
-
- $this->getLoader()->load($def);
-
- $mock = $this->_getInstance($def->getClassName(), $constructorArgs);
- $mock->mockery_init($this, $config->getTargetObject());
-
- if (!empty($quickdefs)) {
- $mock->shouldReceive($quickdefs)->byDefault();
- }
- if (!empty($expectationClosure)) {
- $expectationClosure($mock);
- }
- $this->rememberMock($mock);
- return $mock;
- }
-
- public function instanceMock()
- {
- }
-
- public function getLoader()
- {
- return $this->_loader;
- }
-
- public function getGenerator()
- {
- return $this->_generator;
- }
-
- /**
- * @param string $method
- * @return string|null
- */
- public function getKeyOfDemeterMockFor($method)
- {
- $keys = array_keys($this->_mocks);
- $match = preg_grep("/__demeter_{$method}$/", $keys);
- if (count($match) == 1) {
- $res = array_values($match);
- if (count($res) > 0) {
- return $res[0];
- }
- }
- return null;
- }
-
- /**
- * @return array
- */
- public function getMocks()
- {
- return $this->_mocks;
- }
-
- /**
- * Tear down tasks for this container
- *
- * @throws \Exception
- * @return void
- */
- public function mockery_teardown()
- {
- try {
- $this->mockery_verify();
- } catch (\Exception $e) {
- $this->mockery_close();
- throw $e;
- }
- }
-
- /**
- * Verify the container mocks
- *
- * @return void
- */
- public function mockery_verify()
- {
- foreach ($this->_mocks as $mock) {
- $mock->mockery_verify();
- }
- }
-
- /**
- * Reset the container to its original state
- *
- * @return void
- */
- public function mockery_close()
- {
- foreach ($this->_mocks as $mock) {
- $mock->mockery_teardown();
- }
- $this->_mocks = array();
- }
-
- /**
- * Fetch the next available allocation order number
- *
- * @return int
- */
- public function mockery_allocateOrder()
- {
- $this->_allocatedOrder += 1;
- return $this->_allocatedOrder;
- }
-
- /**
- * Set ordering for a group
- *
- * @param mixed $group
- * @param int $order
- */
- public function mockery_setGroup($group, $order)
- {
- $this->_groups[$group] = $order;
- }
-
- /**
- * Fetch array of ordered groups
- *
- * @return array
- */
- public function mockery_getGroups()
- {
- return $this->_groups;
- }
-
- /**
- * Set current ordered number
- *
- * @param int $order
- * @return int The current order number that was set
- */
- public function mockery_setCurrentOrder($order)
- {
- $this->_currentOrder = $order;
- return $this->_currentOrder;
- }
-
- /**
- * Get current ordered number
- *
- * @return int
- */
- public function mockery_getCurrentOrder()
- {
- return $this->_currentOrder;
- }
-
- /**
- * Validate the current mock's ordering
- *
- * @param string $method
- * @param int $order
- * @throws \Mockery\Exception
- * @return void
- */
- public function mockery_validateOrder($method, $order, \Mockery\MockInterface $mock)
- {
- if ($order < $this->_currentOrder) {
- $exception = new \Mockery\Exception\InvalidOrderException(
- 'Method ' . $method . ' called out of order: expected order '
- . $order . ', was ' . $this->_currentOrder
- );
- $exception->setMock($mock)
- ->setMethodName($method)
- ->setExpectedOrder($order)
- ->setActualOrder($this->_currentOrder);
- throw $exception;
- }
- $this->mockery_setCurrentOrder($order);
- }
-
- /**
- * Gets the count of expectations on the mocks
- *
- * @return int
- */
- public function mockery_getExpectationCount()
- {
- $count = 0;
- foreach ($this->_mocks as $mock) {
- $count += $mock->mockery_getExpectationCount();
- }
- return $count;
- }
-
- /**
- * Store a mock and set its container reference
- *
- * @param \Mockery\Mock
- * @return \Mockery\Mock
- */
- public function rememberMock(\Mockery\MockInterface $mock)
- {
- if (!isset($this->_mocks[get_class($mock)])) {
- $this->_mocks[get_class($mock)] = $mock;
- } else {
- /**
- * This condition triggers for an instance mock where origin mock
- * is already remembered
- */
- $this->_mocks[] = $mock;
- }
- return $mock;
- }
-
- /**
- * Retrieve the last remembered mock object, which is the same as saying
- * retrieve the current mock being programmed where you have yet to call
- * mock() to change it - thus why the method name is "self" since it will be
- * be used during the programming of the same mock.
- *
- * @return \Mockery\Mock
- */
- public function self()
- {
- $mocks = array_values($this->_mocks);
- $index = count($mocks) - 1;
- return $mocks[$index];
- }
-
- /**
- * Return a specific remembered mock according to the array index it
- * was stored to in this container instance
- *
- * @return \Mockery\Mock
- */
- public function fetchMock($reference)
- {
- if (isset($this->_mocks[$reference])) {
- return $this->_mocks[$reference];
- }
- }
-
- protected function _getInstance($mockName, $constructorArgs = null)
- {
- if ($constructorArgs !== null) {
- $r = new \ReflectionClass($mockName);
- return $r->newInstanceArgs($constructorArgs);
- }
-
- try {
- $instantiator = new Instantiator;
- $instance = $instantiator->instantiate($mockName);
- } catch (\Exception $ex) {
- $internalMockName = $mockName . '_Internal';
-
- if (!class_exists($internalMockName)) {
- eval("class $internalMockName extends $mockName {" .
- 'public function __construct() {}' .
- '}');
- }
-
- $instance = new $internalMockName();
- }
-
- return $instance;
- }
-
- /**
- * Takes a class name and declares it
- *
- * @param string $fqcn
- */
- public function declareClass($fqcn)
- {
- if (false !== strpos($fqcn, '/')) {
- throw new \Mockery\Exception(
- 'Class name contains a forward slash instead of backslash needed '
- . 'when employing namespaces'
- );
- }
- if (false !== strpos($fqcn, "\\")) {
- $parts = array_filter(explode("\\", $fqcn), function ($part) {
- return $part !== "";
- });
- $cl = array_pop($parts);
- $ns = implode("\\", $parts);
- eval(" namespace $ns { class $cl {} }");
- } else {
- eval(" class $fqcn {} ");
- }
- }
-
- protected function checkForNamedMockClashes($config)
- {
- $name = $config->getName();
-
- if (!$name) {
- return;
- }
-
- $hash = $config->getHash();
-
- if (isset($this->_namedMocks[$name])) {
- if ($hash !== $this->_namedMocks[$name]) {
- throw new \Mockery\Exception(
- "The mock named '$name' has been already defined with a different mock configuration"
- );
- }
- }
-
- $this->_namedMocks[$name] = $hash;
- }
-}
diff --git a/vendor/mockery/mockery/library/Mockery/CountValidator/AtLeast.php b/vendor/mockery/mockery/library/Mockery/CountValidator/AtLeast.php
deleted file mode 100644
index ca097ce1609..00000000000
--- a/vendor/mockery/mockery/library/Mockery/CountValidator/AtLeast.php
+++ /dev/null
@@ -1,63 +0,0 @@
-_limit > $n) {
- $exception = new Mockery\Exception\InvalidCountException(
- 'Method ' . (string) $this->_expectation
- . ' from ' . $this->_expectation->getMock()->mockery_getName()
- . ' should be called' . PHP_EOL
- . ' at least ' . $this->_limit . ' times but called ' . $n
- . ' times.'
- );
- $exception->setMock($this->_expectation->getMock())
- ->setMethodName((string) $this->_expectation)
- ->setExpectedCountComparative('>=')
- ->setExpectedCount($this->_limit)
- ->setActualCount($n);
- throw $exception;
- }
- }
-}
diff --git a/vendor/mockery/mockery/library/Mockery/CountValidator/AtMost.php b/vendor/mockery/mockery/library/Mockery/CountValidator/AtMost.php
deleted file mode 100644
index 83349d67ef1..00000000000
--- a/vendor/mockery/mockery/library/Mockery/CountValidator/AtMost.php
+++ /dev/null
@@ -1,52 +0,0 @@
-_limit < $n) {
- $exception = new Mockery\Exception\InvalidCountException(
- 'Method ' . (string) $this->_expectation
- . ' from ' . $this->_expectation->getMock()->mockery_getName()
- . ' should be called' . PHP_EOL
- . ' at most ' . $this->_limit . ' times but called ' . $n
- . ' times.'
- );
- $exception->setMock($this->_expectation->getMock())
- ->setMethodName((string) $this->_expectation)
- ->setExpectedCountComparative('<=')
- ->setExpectedCount($this->_limit)
- ->setActualCount($n);
- throw $exception;
- }
- }
-}
diff --git a/vendor/mockery/mockery/library/Mockery/CountValidator/CountValidatorAbstract.php b/vendor/mockery/mockery/library/Mockery/CountValidator/CountValidatorAbstract.php
deleted file mode 100644
index b35a7ceb3fe..00000000000
--- a/vendor/mockery/mockery/library/Mockery/CountValidator/CountValidatorAbstract.php
+++ /dev/null
@@ -1,70 +0,0 @@
-_expectation = $expectation;
- $this->_limit = $limit;
- }
-
- /**
- * Checks if the validator can accept an additional nth call
- *
- * @param int $n
- * @return bool
- */
- public function isEligible($n)
- {
- return ($n < $this->_limit);
- }
-
- /**
- * Validate the call count against this validator
- *
- * @param int $n
- * @return bool
- */
- abstract public function validate($n);
-}
diff --git a/vendor/mockery/mockery/library/Mockery/CountValidator/Exact.php b/vendor/mockery/mockery/library/Mockery/CountValidator/Exact.php
deleted file mode 100644
index 7e3948c1e09..00000000000
--- a/vendor/mockery/mockery/library/Mockery/CountValidator/Exact.php
+++ /dev/null
@@ -1,52 +0,0 @@
-_limit !== $n) {
- $exception = new Mockery\Exception\InvalidCountException(
- 'Method ' . (string) $this->_expectation
- . ' from ' . $this->_expectation->getMock()->mockery_getName()
- . ' should be called' . PHP_EOL
- . ' exactly ' . $this->_limit . ' times but called ' . $n
- . ' times.'
- );
- $exception->setMock($this->_expectation->getMock())
- ->setMethodName((string) $this->_expectation)
- ->setExpectedCountComparative('=')
- ->setExpectedCount($this->_limit)
- ->setActualCount($n);
- throw $exception;
- }
- }
-}
diff --git a/vendor/mockery/mockery/library/Mockery/CountValidator/Exception.php b/vendor/mockery/mockery/library/Mockery/CountValidator/Exception.php
deleted file mode 100644
index 65126ddea69..00000000000
--- a/vendor/mockery/mockery/library/Mockery/CountValidator/Exception.php
+++ /dev/null
@@ -1,25 +0,0 @@
-mockObject = $mock;
- return $this;
- }
-
- public function setMethodName($name)
- {
- $this->method = $name;
- return $this;
- }
-
- public function setActualCount($count)
- {
- $this->actual = $count;
- return $this;
- }
-
- public function setExpectedCount($count)
- {
- $this->expected = $count;
- return $this;
- }
-
- public function setExpectedCountComparative($comp)
- {
- if (!in_array($comp, array('=', '>', '<', '>=', '<='))) {
- throw new RuntimeException(
- 'Illegal comparative for expected call counts set: ' . $comp
- );
- }
- $this->expectedComparative = $comp;
- return $this;
- }
-
- public function getMock()
- {
- return $this->mockObject;
- }
-
- public function getMethodName()
- {
- return $this->method;
- }
-
- public function getActualCount()
- {
- return $this->actual;
- }
-
- public function getExpectedCount()
- {
- return $this->expected;
- }
-
- public function getMockName()
- {
- return $this->getMock()->mockery_getName();
- }
-
- public function getExpectedCountComparative()
- {
- return $this->expectedComparative;
- }
-}
diff --git a/vendor/mockery/mockery/library/Mockery/Exception/InvalidOrderException.php b/vendor/mockery/mockery/library/Mockery/Exception/InvalidOrderException.php
deleted file mode 100644
index 418372c7573..00000000000
--- a/vendor/mockery/mockery/library/Mockery/Exception/InvalidOrderException.php
+++ /dev/null
@@ -1,84 +0,0 @@
-mockObject = $mock;
- return $this;
- }
-
- public function setMethodName($name)
- {
- $this->method = $name;
- return $this;
- }
-
- public function setActualOrder($count)
- {
- $this->actual = $count;
- return $this;
- }
-
- public function setExpectedOrder($count)
- {
- $this->expected = $count;
- return $this;
- }
-
- public function getMock()
- {
- return $this->mockObject;
- }
-
- public function getMethodName()
- {
- return $this->method;
- }
-
- public function getActualOrder()
- {
- return $this->actual;
- }
-
- public function getExpectedOrder()
- {
- return $this->expected;
- }
-
- public function getMockName()
- {
- return $this->getMock()->mockery_getName();
- }
-}
diff --git a/vendor/mockery/mockery/library/Mockery/Exception/NoMatchingExpectationException.php b/vendor/mockery/mockery/library/Mockery/Exception/NoMatchingExpectationException.php
deleted file mode 100644
index 8476b5934bb..00000000000
--- a/vendor/mockery/mockery/library/Mockery/Exception/NoMatchingExpectationException.php
+++ /dev/null
@@ -1,71 +0,0 @@
-mockObject = $mock;
- return $this;
- }
-
- public function setMethodName($name)
- {
- $this->method = $name;
- return $this;
- }
-
- public function setActualArguments($count)
- {
- $this->actual = $count;
- return $this;
- }
-
- public function getMock()
- {
- return $this->mockObject;
- }
-
- public function getMethodName()
- {
- return $this->method;
- }
-
- public function getActualArguments()
- {
- return $this->actual;
- }
-
- public function getMockName()
- {
- return $this->getMock()->mockery_getName();
- }
-}
diff --git a/vendor/mockery/mockery/library/Mockery/Exception/RuntimeException.php b/vendor/mockery/mockery/library/Mockery/Exception/RuntimeException.php
deleted file mode 100644
index 323b33d11eb..00000000000
--- a/vendor/mockery/mockery/library/Mockery/Exception/RuntimeException.php
+++ /dev/null
@@ -1,25 +0,0 @@
-_mock = $mock;
- $this->_name = $name;
- }
-
- /**
- * Return a string with the method name and arguments formatted
- *
- * @param string $name Name of the expected method
- * @param array $args List of arguments to the method
- * @return string
- */
- public function __toString()
- {
- return \Mockery::formatArgs($this->_name, $this->_expectedArgs);
- }
-
- /**
- * Verify the current call, i.e. that the given arguments match those
- * of this expectation
- *
- * @param array $args
- * @return mixed
- */
- public function verifyCall(array $args)
- {
- $this->validateOrder();
- $this->_actualCount++;
- if (true === $this->_passthru) {
- return $this->_mock->mockery_callSubjectMethod($this->_name, $args);
- }
- $return = $this->_getReturnValue($args);
- if ($return instanceof \Exception && $this->_throw === true) {
- throw $return;
- }
- $this->_setValues();
- return $return;
- }
-
- /**
- * Sets public properties with queued values to the mock object
- *
- * @param array $args
- * @return mixed
- */
- protected function _setValues()
- {
- foreach ($this->_setQueue as $name => &$values) {
- if (count($values) > 0) {
- $value = array_shift($values);
- $this->_mock->{$name} = $value;
- }
- }
- }
-
- /**
- * Fetch the return value for the matching args
- *
- * @param array $args
- * @return mixed
- */
- protected function _getReturnValue(array $args)
- {
- if (count($this->_closureQueue) > 1) {
- return call_user_func_array(array_shift($this->_closureQueue), $args);
- } elseif (count($this->_closureQueue) > 0) {
- return call_user_func_array(current($this->_closureQueue), $args);
- } elseif (count($this->_returnQueue) > 1) {
- return array_shift($this->_returnQueue);
- } elseif (count($this->_returnQueue) > 0) {
- return current($this->_returnQueue);
- }
-
- $rm = $this->_mock->mockery_getMethod($this->_name);
- if ($rm && version_compare(PHP_VERSION, '7.0.0-dev') >= 0 && $rm->hasReturnType()) {
- $type = (string) $rm->getReturnType();
- switch ($type) {
- case '': return;
- case 'void': return;
- case 'string': return '';
- case 'int': return 0;
- case 'float': return 0.0;
- case 'bool': return false;
- case 'array': return array();
-
- case 'callable':
- case 'Closure':
- return function () {};
-
- case 'Traversable':
- case 'Generator':
- // Remove eval() when minimum version >=5.5
- $generator = eval('return function () { yield; };');
- return $generator();
-
- default:
- return \Mockery::mock($type);
- }
- }
- }
-
- /**
- * Checks if this expectation is eligible for additional calls
- *
- * @return bool
- */
- public function isEligible()
- {
- foreach ($this->_countValidators as $validator) {
- if (!$validator->isEligible($this->_actualCount)) {
- return false;
- }
- }
- return true;
- }
-
- /**
- * Check if there is a constraint on call count
- *
- * @return bool
- */
- public function isCallCountConstrained()
- {
- return (count($this->_countValidators) > 0);
- }
-
- /**
- * Verify call order
- *
- * @return void
- */
- public function validateOrder()
- {
- if ($this->_orderNumber) {
- $this->_mock->mockery_validateOrder((string) $this, $this->_orderNumber, $this->_mock);
- }
- if ($this->_globalOrderNumber) {
- $this->_mock->mockery_getContainer()
- ->mockery_validateOrder((string) $this, $this->_globalOrderNumber, $this->_mock);
- }
- }
-
- /**
- * Verify this expectation
- *
- * @return bool
- */
- public function verify()
- {
- foreach ($this->_countValidators as $validator) {
- $validator->validate($this->_actualCount);
- }
- }
-
- /**
- * Check if passed arguments match an argument expectation
- *
- * @param array $args
- * @return bool
- */
- public function matchArgs(array $args)
- {
- if (empty($this->_expectedArgs) && !$this->_noArgsExpectation) {
- return true;
- }
- if (count($args) !== count($this->_expectedArgs)) {
- return false;
- }
- $argCount = count($args);
- for ($i=0; $i<$argCount; $i++) {
- $param =& $args[$i];
- if (!$this->_matchArg($this->_expectedArgs[$i], $param)) {
- return false;
- }
- }
-
- return true;
- }
-
- /**
- * Check if passed argument matches an argument expectation
- *
- * @param array $args
- * @return bool
- */
- protected function _matchArg($expected, &$actual)
- {
- if ($expected === $actual) {
- return true;
- }
- if (!is_object($expected) && !is_object($actual) && $expected == $actual) {
- return true;
- }
- if (is_string($expected) && !is_array($actual) && !is_object($actual)) {
- # push/pop an error handler here to to make sure no error/exception thrown if $expected is not a regex
- set_error_handler(function () {});
- $result = preg_match($expected, (string) $actual);
- restore_error_handler();
-
- if ($result) {
- return true;
- }
- }
- if (is_string($expected) && is_object($actual)) {
- $result = $actual instanceof $expected;
- if ($result) {
- return true;
- }
- }
- if ($expected instanceof \Mockery\Matcher\MatcherAbstract) {
- return $expected->match($actual);
- }
- if (is_a($expected, '\Hamcrest\Matcher') || is_a($expected, '\Hamcrest_Matcher')) {
- return $expected->matches($actual);
- }
- return false;
- }
-
- /**
- * Expected argument setter for the expectation
- *
- * @param mixed ...
- * @return self
- */
- public function with()
- {
- return $this->withArgs(func_get_args());
- }
-
- /**
- * Expected arguments for the expectation passed as an array
- *
- * @param array $args
- * @return self
- */
- public function withArgs(array $args)
- {
- if (empty($args)) {
- return $this->withNoArgs();
- }
- $this->_expectedArgs = $args;
- $this->_noArgsExpectation = false;
- return $this;
- }
-
- /**
- * Set with() as no arguments expected
- *
- * @return self
- */
- public function withNoArgs()
- {
- $this->_noArgsExpectation = true;
- $this->_expectedArgs = null;
- return $this;
- }
-
- /**
- * Set expectation that any arguments are acceptable
- *
- * @return self
- */
- public function withAnyArgs()
- {
- $this->_expectedArgs = array();
- return $this;
- }
-
- /**
- * Set a return value, or sequential queue of return values
- *
- * @param mixed ...
- * @return self
- */
- public function andReturn()
- {
- $this->_returnQueue = func_get_args();
- return $this;
- }
-
- /**
- * Return this mock, like a fluent interface
- *
- * @return self
- */
- public function andReturnSelf()
- {
- return $this->andReturn($this->_mock);
- }
-
- /**
- * Set a sequential queue of return values with an array
- *
- * @param array $values
- * @return self
- */
- public function andReturnValues(array $values)
- {
- call_user_func_array(array($this, 'andReturn'), $values);
- return $this;
- }
-
- /**
- * Set a closure or sequence of closures with which to generate return
- * values. The arguments passed to the expected method are passed to the
- * closures as parameters.
- *
- * @param callable ...
- * @return self
- */
- public function andReturnUsing()
- {
- $this->_closureQueue = func_get_args();
- return $this;
- }
-
- /**
- * Return a self-returning black hole object.
- *
- * @return self
- */
- public function andReturnUndefined()
- {
- $this->andReturn(new \Mockery\Undefined);
- return $this;
- }
-
- /**
- * Return null. This is merely a language construct for Mock describing.
- *
- * @return self
- */
- public function andReturnNull()
- {
- return $this;
- }
-
- /**
- * Set Exception class and arguments to that class to be thrown
- *
- * @param string $exception
- * @param string $message
- * @param int $code
- * @param Exception $previous
- * @return self
- */
- public function andThrow($exception, $message = '', $code = 0, \Exception $previous = null)
- {
- $this->_throw = true;
- if (is_object($exception)) {
- $this->andReturn($exception);
- } else {
- $this->andReturn(new $exception($message, $code, $previous));
- }
- return $this;
- }
-
- /**
- * Set Exception classes to be thrown
- *
- * @param array $exceptions
- * @return self
- */
- public function andThrowExceptions(array $exceptions)
- {
- $this->_throw = true;
- foreach ($exceptions as $exception) {
- if (!is_object($exception)) {
- throw new Exception('You must pass an array of exception objects to andThrowExceptions');
- }
- }
- return $this->andReturnValues($exceptions);
- }
-
- /**
- * Register values to be set to a public property each time this expectation occurs
- *
- * @param string $name
- * @param mixed $value
- * @return self
- */
- public function andSet($name, $value)
- {
- $values = func_get_args();
- array_shift($values);
- $this->_setQueue[$name] = $values;
- return $this;
- }
-
- /**
- * Alias to andSet(). Allows the natural English construct
- * - set('foo', 'bar')->andReturn('bar')
- *
- * @param string $name
- * @param mixed $value
- * @return self
- */
- public function set($name, $value)
- {
- return call_user_func_array(array($this, 'andSet'), func_get_args());
- }
-
- /**
- * Indicates this expectation should occur zero or more times
- *
- * @return self
- */
- public function zeroOrMoreTimes()
- {
- $this->atLeast()->never();
- }
-
- /**
- * Indicates the number of times this expectation should occur
- *
- * @param int $limit
- * @return self
- */
- public function times($limit = null)
- {
- if (is_null($limit)) {
- return $this;
- }
- $this->_countValidators[] = new $this->_countValidatorClass($this, $limit);
- $this->_countValidatorClass = 'Mockery\CountValidator\Exact';
- return $this;
- }
-
- /**
- * Indicates that this expectation is never expected to be called
- *
- * @return self
- */
- public function never()
- {
- return $this->times(0);
- }
-
- /**
- * Indicates that this expectation is expected exactly once
- *
- * @return self
- */
- public function once()
- {
- return $this->times(1);
- }
-
- /**
- * Indicates that this expectation is expected exactly twice
- *
- * @return self
- */
- public function twice()
- {
- return $this->times(2);
- }
-
- /**
- * Sets next count validator to the AtLeast instance
- *
- * @return self
- */
- public function atLeast()
- {
- $this->_countValidatorClass = 'Mockery\CountValidator\AtLeast';
- return $this;
- }
-
- /**
- * Sets next count validator to the AtMost instance
- *
- * @return self
- */
- public function atMost()
- {
- $this->_countValidatorClass = 'Mockery\CountValidator\AtMost';
- return $this;
- }
-
- /**
- * Shorthand for setting minimum and maximum constraints on call counts
- *
- * @param int $minimum
- * @param int $maximum
- */
- public function between($minimum, $maximum)
- {
- return $this->atLeast()->times($minimum)->atMost()->times($maximum);
- }
-
- /**
- * Indicates that this expectation must be called in a specific given order
- *
- * @param string $group Name of the ordered group
- * @return self
- */
- public function ordered($group = null)
- {
- if ($this->_globally) {
- $this->_globalOrderNumber = $this->_defineOrdered($group, $this->_mock->mockery_getContainer());
- } else {
- $this->_orderNumber = $this->_defineOrdered($group, $this->_mock);
- }
- $this->_globally = false;
- return $this;
- }
-
- /**
- * Indicates call order should apply globally
- *
- * @return self
- */
- public function globally()
- {
- $this->_globally = true;
- return $this;
- }
-
- /**
- * Setup the ordering tracking on the mock or mock container
- *
- * @param string $group
- * @param object $ordering
- * @return int
- */
- protected function _defineOrdered($group, $ordering)
- {
- $groups = $ordering->mockery_getGroups();
- if (is_null($group)) {
- $result = $ordering->mockery_allocateOrder();
- } elseif (isset($groups[$group])) {
- $result = $groups[$group];
- } else {
- $result = $ordering->mockery_allocateOrder();
- $ordering->mockery_setGroup($group, $result);
- }
- return $result;
- }
-
- /**
- * Return order number
- *
- * @return int
- */
- public function getOrderNumber()
- {
- return $this->_orderNumber;
- }
-
- /**
- * Mark this expectation as being a default
- *
- * @return self
- */
- public function byDefault()
- {
- $director = $this->_mock->mockery_getExpectationsFor($this->_name);
- if (!empty($director)) {
- $director->makeExpectationDefault($this);
- }
- return $this;
- }
-
- /**
- * Return the parent mock of the expectation
- *
- * @return \Mockery\MockInterface
- */
- public function getMock()
- {
- return $this->_mock;
- }
-
- /**
- * Flag this expectation as calling the original class method with the
- * any provided arguments instead of using a return value queue.
- *
- * @return self
- */
- public function passthru()
- {
- if ($this->_mock instanceof Mock) {
- throw new Exception(
- 'Mock Objects not created from a loaded/existing class are '
- . 'incapable of passing method calls through to a parent class'
- );
- }
- $this->_passthru = true;
- return $this;
- }
-
- /**
- * Cloning logic
- *
- */
- public function __clone()
- {
- $newValidators = array();
- $countValidators = $this->_countValidators;
- foreach ($countValidators as $validator) {
- $newValidators[] = clone $validator;
- }
- $this->_countValidators = $newValidators;
- }
-
- public function getName()
- {
- return $this->_name;
- }
-}
diff --git a/vendor/mockery/mockery/library/Mockery/ExpectationDirector.php b/vendor/mockery/mockery/library/Mockery/ExpectationDirector.php
deleted file mode 100644
index b5c894d6530..00000000000
--- a/vendor/mockery/mockery/library/Mockery/ExpectationDirector.php
+++ /dev/null
@@ -1,203 +0,0 @@
-_name = $name;
- $this->_mock = $mock;
- }
-
- /**
- * Add a new expectation to the director
- *
- * @param Mutateme\Expectation $expectation
- */
- public function addExpectation(\Mockery\Expectation $expectation)
- {
- $this->_expectations[] = $expectation;
- }
-
- /**
- * Handle a method call being directed by this instance
- *
- * @param array $args
- * @return mixed
- */
- public function call(array $args)
- {
- $expectation = $this->findExpectation($args);
- if (is_null($expectation)) {
- $exception = new \Mockery\Exception\NoMatchingExpectationException(
- 'No matching handler found for '
- . $this->_mock->mockery_getName() . '::'
- . \Mockery::formatArgs($this->_name, $args)
- . '. Either the method was unexpected or its arguments matched'
- . ' no expected argument list for this method'
- . PHP_EOL . PHP_EOL
- . \Mockery::formatObjects($args)
- );
- $exception->setMock($this->_mock)
- ->setMethodName($this->_name)
- ->setActualArguments($args);
- throw $exception;
- }
- return $expectation->verifyCall($args);
- }
-
- /**
- * Verify all expectations of the director
- *
- * @throws \Mockery\CountValidator\Exception
- * @return void
- */
- public function verify()
- {
- if (!empty($this->_expectations)) {
- foreach ($this->_expectations as $exp) {
- $exp->verify();
- }
- } else {
- foreach ($this->_defaults as $exp) {
- $exp->verify();
- }
- }
- }
-
- /**
- * Attempt to locate an expectation matching the provided args
- *
- * @param array $args
- * @return mixed
- */
- public function findExpectation(array $args)
- {
- if (!empty($this->_expectations)) {
- return $this->_findExpectationIn($this->_expectations, $args);
- } else {
- return $this->_findExpectationIn($this->_defaults, $args);
- }
- }
-
- /**
- * Make the given expectation a default for all others assuming it was
- * correctly created last
- *
- * @param \Mockery\Expectation
- */
- public function makeExpectationDefault(\Mockery\Expectation $expectation)
- {
- $last = end($this->_expectations);
- if ($last === $expectation) {
- array_pop($this->_expectations);
- array_unshift($this->_defaults, $expectation);
- } else {
- throw new \Mockery\Exception(
- 'Cannot turn a previously defined expectation into a default'
- );
- }
- }
-
- /**
- * Search current array of expectations for a match
- *
- * @param array $expectations
- * @param array $args
- * @return mixed
- */
- protected function _findExpectationIn(array $expectations, array $args)
- {
- foreach ($expectations as $exp) {
- if ($exp->matchArgs($args) && $exp->isEligible()) {
- return $exp;
- }
- }
- foreach ($expectations as $exp) {
- if ($exp->matchArgs($args)) {
- return $exp;
- }
- }
- }
-
- /**
- * Return all expectations assigned to this director
- *
- * @return array
- */
- public function getExpectations()
- {
- return $this->_expectations;
- }
-
- /**
- * Return the number of expectations assigned to this director.
- *
- * @return int
- */
- public function getExpectationCount()
- {
- return count($this->getExpectations());
- }
-}
diff --git a/vendor/mockery/mockery/library/Mockery/ExpectationInterface.php b/vendor/mockery/mockery/library/Mockery/ExpectationInterface.php
deleted file mode 100644
index a5b4660de0b..00000000000
--- a/vendor/mockery/mockery/library/Mockery/ExpectationInterface.php
+++ /dev/null
@@ -1,39 +0,0 @@
-generator = $generator;
- }
-
- public function generate(MockConfiguration $config)
- {
- $hash = $config->getHash();
- if (isset($this->cache[$hash])) {
- return $this->cache[$hash];
- }
-
- $definition = $this->generator->generate($config);
- $this->cache[$hash] = $definition;
-
- return $definition;
- }
-}
diff --git a/vendor/mockery/mockery/library/Mockery/Generator/DefinedTargetClass.php b/vendor/mockery/mockery/library/Mockery/Generator/DefinedTargetClass.php
deleted file mode 100644
index 2c0ab963908..00000000000
--- a/vendor/mockery/mockery/library/Mockery/Generator/DefinedTargetClass.php
+++ /dev/null
@@ -1,90 +0,0 @@
-rfc = $rfc;
- }
-
- public static function factory($name)
- {
- return new self(new \ReflectionClass($name));
- }
-
- public function getName()
- {
- return $this->rfc->getName();
- }
-
- public function isAbstract()
- {
- return $this->rfc->isAbstract();
- }
-
- public function isFinal()
- {
- return $this->rfc->isFinal();
- }
-
- public function getMethods()
- {
- return array_map(function ($method) {
- return new Method($method);
- }, $this->rfc->getMethods());
- }
-
- public function getInterfaces()
- {
- $class = __CLASS__;
- return array_map(function ($interface) use ($class) {
- return new $class($interface);
- }, $this->rfc->getInterfaces());
- }
-
- public function __toString()
- {
- return $this->getName();
- }
-
- public function getNamespaceName()
- {
- return $this->rfc->getNamespaceName();
- }
-
- public function inNamespace()
- {
- return $this->rfc->inNamespace();
- }
-
- public function getShortName()
- {
- return $this->rfc->getShortName();
- }
-
- public function implementsInterface($interface)
- {
- return $this->rfc->implementsInterface($interface);
- }
-
- public function hasInternalAncestor()
- {
- if ($this->rfc->isInternal()) {
- return true;
- }
-
- $child = $this->rfc;
- while ($parent = $child->getParentClass()) {
- if ($parent->isInternal()) {
- return true;
- }
- $child = $parent;
- }
-
- return false;
- }
-}
diff --git a/vendor/mockery/mockery/library/Mockery/Generator/Generator.php b/vendor/mockery/mockery/library/Mockery/Generator/Generator.php
deleted file mode 100644
index 5c5d0d3e1ef..00000000000
--- a/vendor/mockery/mockery/library/Mockery/Generator/Generator.php
+++ /dev/null
@@ -1,9 +0,0 @@
-method = $method;
- }
-
- public function __call($method, $args)
- {
- return call_user_func_array(array($this->method, $method), $args);
- }
-
- public function getParameters()
- {
- return array_map(function ($parameter) {
- return new Parameter($parameter);
- }, $this->method->getParameters());
- }
-
- public function getReturnType()
- {
- if (version_compare(PHP_VERSION, '7.0.0-dev') >= 0 && $this->method->hasReturnType()) {
- $returnType = (string) $this->method->getReturnType();
-
- if ('self' === $returnType) {
- $returnType = "\\".$this->method->getDeclaringClass()->getName();
- }
-
- if (version_compare(PHP_VERSION, '7.1.0-dev') >= 0 && $this->method->getReturnType()->allowsNull()) {
- $returnType = '?'.$returnType;
- }
-
- return $returnType;
- }
- return '';
- }
-}
diff --git a/vendor/mockery/mockery/library/Mockery/Generator/MockConfiguration.php b/vendor/mockery/mockery/library/Mockery/Generator/MockConfiguration.php
deleted file mode 100644
index 27aa5bd266e..00000000000
--- a/vendor/mockery/mockery/library/Mockery/Generator/MockConfiguration.php
+++ /dev/null
@@ -1,460 +0,0 @@
-addTargets($targets);
- $this->blackListedMethods = $blackListedMethods;
- $this->whiteListedMethods = $whiteListedMethods;
- $this->name = $name;
- $this->instanceMock = $instanceMock;
- $this->parameterOverrides = $parameterOverrides;
- }
-
- /**
- * Attempt to create a hash of the configuration, in order to allow caching
- *
- * @TODO workout if this will work
- *
- * @return string
- */
- public function getHash()
- {
- $vars = array(
- 'targetClassName' => $this->targetClassName,
- 'targetInterfaceNames' => $this->targetInterfaceNames,
- 'name' => $this->name,
- 'blackListedMethods' => $this->blackListedMethods,
- 'whiteListedMethod' => $this->whiteListedMethods,
- 'instanceMock' => $this->instanceMock,
- 'parameterOverrides' => $this->parameterOverrides,
- );
-
- return md5(serialize($vars));
- }
-
- /**
- * Gets a list of methods from the classes, interfaces and objects and
- * filters them appropriately. Lot's of filtering going on, perhaps we could
- * have filter classes to iterate through
- */
- public function getMethodsToMock()
- {
- $methods = $this->getAllMethods();
-
- foreach ($methods as $key => $method) {
- if ($method->isFinal()) {
- unset($methods[$key]);
- }
- }
-
- /**
- * Whitelist trumps everything else
- */
- if (count($this->getWhiteListedMethods())) {
- $whitelist = array_map('strtolower', $this->getWhiteListedMethods());
- $methods = array_filter($methods, function ($method) use ($whitelist) {
- return $method->isAbstract() || in_array(strtolower($method->getName()), $whitelist);
- });
-
- return $methods;
- }
-
- /**
- * Remove blacklisted methods
- */
- if (count($this->getBlackListedMethods())) {
- $blacklist = array_map('strtolower', $this->getBlackListedMethods());
- $methods = array_filter($methods, function ($method) use ($blacklist) {
- return !in_array(strtolower($method->getName()), $blacklist);
- });
- }
-
- /**
- * Internal objects can not be instantiated with newInstanceArgs and if
- * they implement Serializable, unserialize will have to be called. As
- * such, we can't mock it and will need a pass to add a dummy
- * implementation
- */
- if ($this->getTargetClass()
- && $this->getTargetClass()->implementsInterface("Serializable")
- && $this->getTargetClass()->hasInternalAncestor()) {
- $methods = array_filter($methods, function ($method) {
- return $method->getName() !== "unserialize";
- });
- }
-
- return array_values($methods);
- }
-
- /**
- * We declare the __call method to handle undefined stuff, if the class
- * we're mocking has also defined it, we need to comply with their interface
- */
- public function requiresCallTypeHintRemoval()
- {
- foreach ($this->getAllMethods() as $method) {
- if ("__call" === $method->getName()) {
- $params = $method->getParameters();
- return !$params[1]->isArray();
- }
- }
-
- return false;
- }
-
- /**
- * We declare the __callStatic method to handle undefined stuff, if the class
- * we're mocking has also defined it, we need to comply with their interface
- */
- public function requiresCallStaticTypeHintRemoval()
- {
- foreach ($this->getAllMethods() as $method) {
- if ("__callStatic" === $method->getName()) {
- $params = $method->getParameters();
- return !$params[1]->isArray();
- }
- }
-
- return false;
- }
-
- public function rename($className)
- {
- $targets = array();
-
- if ($this->targetClassName) {
- $targets[] = $this->targetClassName;
- }
-
- if ($this->targetInterfaceNames) {
- $targets = array_merge($targets, $this->targetInterfaceNames);
- }
-
- if ($this->targetObject) {
- $targets[] = $this->targetObject;
- }
-
- return new self(
- $targets,
- $this->blackListedMethods,
- $this->whiteListedMethods,
- $className,
- $this->instanceMock,
- $this->parameterOverrides
- );
- }
-
- protected function addTarget($target)
- {
- if (is_object($target)) {
- $this->setTargetObject($target);
- $this->setTargetClassName(get_class($target));
- return $this;
- }
-
- if ($target[0] !== "\\") {
- $target = "\\" . $target;
- }
-
- if (class_exists($target)) {
- $this->setTargetClassName($target);
- return $this;
- }
-
- if (interface_exists($target)) {
- $this->addTargetInterfaceName($target);
- return $this;
- }
-
- /**
- * Default is to set as class, or interface if class already set
- *
- * Don't like this condition, can't remember what the default
- * targetClass is for
- */
- if ($this->getTargetClassName()) {
- $this->addTargetInterfaceName($target);
- return $this;
- }
-
- $this->setTargetClassName($target);
- }
-
- protected function addTargets($interfaces)
- {
- foreach ($interfaces as $interface) {
- $this->addTarget($interface);
- }
- }
-
- public function getTargetClassName()
- {
- return $this->targetClassName;
- }
-
- public function getTargetClass()
- {
- if ($this->targetClass) {
- return $this->targetClass;
- }
-
- if (!$this->targetClassName) {
- return null;
- }
-
- if (class_exists($this->targetClassName)) {
- $dtc = DefinedTargetClass::factory($this->targetClassName);
-
- if ($this->getTargetObject() == false && $dtc->isFinal()) {
- throw new \Mockery\Exception(
- 'The class ' . $this->targetClassName . ' is marked final and its methods'
- . ' cannot be replaced. Classes marked final can be passed in'
- . ' to \Mockery::mock() as instantiated objects to create a'
- . ' partial mock, but only if the mock is not subject to type'
- . ' hinting checks.'
- );
- }
-
- $this->targetClass = $dtc;
- } else {
- $this->targetClass = new UndefinedTargetClass($this->targetClassName);
- }
-
- return $this->targetClass;
- }
-
- public function getTargetInterfaces()
- {
- if (!empty($this->targetInterfaces)) {
- return $this->targetInterfaces;
- }
-
- foreach ($this->targetInterfaceNames as $targetInterface) {
- if (!interface_exists($targetInterface)) {
- $this->targetInterfaces[] = new UndefinedTargetClass($targetInterface);
- return;
- }
-
- $dtc = DefinedTargetClass::factory($targetInterface);
- $extendedInterfaces = array_keys($dtc->getInterfaces());
- $extendedInterfaces[] = $targetInterface;
-
- $traversableFound = false;
- $iteratorShiftedToFront = false;
- foreach ($extendedInterfaces as $interface) {
- if (!$traversableFound && preg_match("/^\\?Iterator(|Aggregate)$/i", $interface)) {
- break;
- }
-
- if (preg_match("/^\\\\?IteratorAggregate$/i", $interface)) {
- $this->targetInterfaces[] = DefinedTargetClass::factory("\\IteratorAggregate");
- $iteratorShiftedToFront = true;
- } elseif (preg_match("/^\\\\?Iterator$/i", $interface)) {
- $this->targetInterfaces[] = DefinedTargetClass::factory("\\Iterator");
- $iteratorShiftedToFront = true;
- } elseif (preg_match("/^\\\\?Traversable$/i", $interface)) {
- $traversableFound = true;
- }
- }
-
- if ($traversableFound && !$iteratorShiftedToFront) {
- $this->targetInterfaces[] = DefinedTargetClass::factory("\\IteratorAggregate");
- }
-
- /**
- * We never straight up implement Traversable
- */
- if (!preg_match("/^\\\\?Traversable$/i", $targetInterface)) {
- $this->targetInterfaces[] = $dtc;
- }
- }
- $this->targetInterfaces = array_unique($this->targetInterfaces); // just in case
- return $this->targetInterfaces;
- }
-
- public function getTargetObject()
- {
- return $this->targetObject;
- }
-
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * Generate a suitable name based on the config
- */
- public function generateName()
- {
- $name = 'Mockery_' . static::$mockCounter++;
-
- if ($this->getTargetObject()) {
- $name .= "_" . str_replace("\\", "_", get_class($this->getTargetObject()));
- }
-
- if ($this->getTargetClass()) {
- $name .= "_" . str_replace("\\", "_", $this->getTargetClass()->getName());
- }
-
- if ($this->getTargetInterfaces()) {
- $name .= array_reduce($this->getTargetInterfaces(), function ($tmpname, $i) {
- $tmpname .= '_' . str_replace("\\", "_", $i->getName());
- return $tmpname;
- }, '');
- }
-
- return $name;
- }
-
- public function getShortName()
- {
- $parts = explode("\\", $this->getName());
- return array_pop($parts);
- }
-
- public function getNamespaceName()
- {
- $parts = explode("\\", $this->getName());
- array_pop($parts);
-
- if (count($parts)) {
- return implode("\\", $parts);
- }
-
- return "";
- }
-
- public function getBlackListedMethods()
- {
- return $this->blackListedMethods;
- }
-
- public function getWhiteListedMethods()
- {
- return $this->whiteListedMethods;
- }
-
- public function isInstanceMock()
- {
- return $this->instanceMock;
- }
-
- public function getParameterOverrides()
- {
- return $this->parameterOverrides;
- }
-
- protected function setTargetClassName($targetClassName)
- {
- $this->targetClassName = $targetClassName;
- }
-
- protected function getAllMethods()
- {
- if ($this->allMethods) {
- return $this->allMethods;
- }
-
- $classes = $this->getTargetInterfaces();
-
- if ($this->getTargetClass()) {
- $classes[] = $this->getTargetClass();
- }
-
- $methods = array();
- foreach ($classes as $class) {
- $methods = array_merge($methods, $class->getMethods());
- }
-
- $names = array();
- $methods = array_filter($methods, function ($method) use (&$names) {
- if (in_array($method->getName(), $names)) {
- return false;
- }
-
- $names[] = $method->getName();
- return true;
- });
-
- return $this->allMethods = $methods;
- }
-
- /**
- * If we attempt to implement Traversable, we must ensure we are also
- * implementing either Iterator or IteratorAggregate, and that whichever one
- * it is comes before Traversable in the list of implements.
- */
- protected function addTargetInterfaceName($targetInterface)
- {
- $this->targetInterfaceNames[] = $targetInterface;
- }
-
-
- protected function setTargetObject($object)
- {
- $this->targetObject = $object;
- }
-}
diff --git a/vendor/mockery/mockery/library/Mockery/Generator/MockConfigurationBuilder.php b/vendor/mockery/mockery/library/Mockery/Generator/MockConfigurationBuilder.php
deleted file mode 100644
index 1a7512e73bf..00000000000
--- a/vendor/mockery/mockery/library/Mockery/Generator/MockConfigurationBuilder.php
+++ /dev/null
@@ -1,124 +0,0 @@
-targets[] = $target;
-
- return $this;
- }
-
- public function addTargets($targets)
- {
- foreach ($targets as $target) {
- $this->addTarget($target);
- }
-
- return $this;
- }
-
- public function setName($name)
- {
- $this->name = $name;
- return $this;
- }
-
- public function addBlackListedMethod($blackListedMethod)
- {
- $this->blackListedMethods[] = $blackListedMethod;
- return $this;
- }
-
- public function addBlackListedMethods(array $blackListedMethods)
- {
- foreach ($blackListedMethods as $method) {
- $this->addBlackListedMethod($method);
- }
- return $this;
- }
-
- public function setBlackListedMethods(array $blackListedMethods)
- {
- $this->blackListedMethods = $blackListedMethods;
- return $this;
- }
-
- public function addWhiteListedMethod($whiteListedMethod)
- {
- $this->whiteListedMethods[] = $whiteListedMethod;
- return $this;
- }
-
- public function addWhiteListedMethods(array $whiteListedMethods)
- {
- foreach ($whiteListedMethods as $method) {
- $this->addWhiteListedMethod($method);
- }
- return $this;
- }
-
- public function setWhiteListedMethods(array $whiteListedMethods)
- {
- $this->whiteListedMethods = $whiteListedMethods;
- return $this;
- }
-
- public function setInstanceMock($instanceMock)
- {
- $this->instanceMock = (bool) $instanceMock;
- }
-
- public function setParameterOverrides(array $overrides)
- {
- $this->parameterOverrides = $overrides;
- }
-
- public function getMockConfiguration()
- {
- return new MockConfiguration(
- $this->targets,
- $this->blackListedMethods,
- $this->whiteListedMethods,
- $this->name,
- $this->instanceMock,
- $this->parameterOverrides
- );
- }
-}
diff --git a/vendor/mockery/mockery/library/Mockery/Generator/MockDefinition.php b/vendor/mockery/mockery/library/Mockery/Generator/MockDefinition.php
deleted file mode 100644
index 29c8e207c63..00000000000
--- a/vendor/mockery/mockery/library/Mockery/Generator/MockDefinition.php
+++ /dev/null
@@ -1,33 +0,0 @@
-getName()) {
- throw new \InvalidArgumentException("MockConfiguration must contain a name");
- }
- $this->config = $config;
- $this->code = $code;
- }
-
- public function getConfig()
- {
- return $this->config;
- }
-
- public function getClassName()
- {
- return $this->config->getName();
- }
-
- public function getCode()
- {
- return $this->code;
- }
-}
diff --git a/vendor/mockery/mockery/library/Mockery/Generator/Parameter.php b/vendor/mockery/mockery/library/Mockery/Generator/Parameter.php
deleted file mode 100644
index 4e08710b46c..00000000000
--- a/vendor/mockery/mockery/library/Mockery/Generator/Parameter.php
+++ /dev/null
@@ -1,101 +0,0 @@
-rfp = $rfp;
- }
-
- public function __call($method, array $args)
- {
- return call_user_func_array(array($this->rfp, $method), $args);
- }
-
- public function getClass()
- {
- return new DefinedTargetClass($this->rfp->getClass());
- }
-
- public function getTypeHintAsString()
- {
- if (method_exists($this->rfp, 'getTypehintText')) {
- // Available in HHVM
- $typehint = $this->rfp->getTypehintText();
-
- // not exhaustive, but will do for now
- if (in_array($typehint, array('int', 'integer', 'float', 'string', 'bool', 'boolean'))) {
- return '';
- }
-
- return $typehint;
- }
-
- if ($this->rfp->isArray()) {
- return 'array';
- }
-
- /*
- * PHP < 5.4.1 has some strange behaviour with a typehint of self and
- * subclass signatures, so we risk the regexp instead
- */
- if ((version_compare(PHP_VERSION, '5.4.1') >= 0)) {
- try {
- if ($this->rfp->getClass()) {
- return $this->getOptionalSign() . $this->rfp->getClass()->getName();
- }
- } catch (\ReflectionException $re) {
- // noop
- }
- }
-
- if (version_compare(PHP_VERSION, '7.0.0-dev') >= 0 && $this->rfp->hasType()) {
- return $this->getOptionalSign() . $this->rfp->getType();
- }
-
- if (preg_match('/^Parameter #[0-9]+ \[ \<(required|optional)\> (?\S+ )?.*\$' . $this->rfp->getName() . ' .*\]$/', $this->rfp->__toString(), $typehintMatch)) {
- if (!empty($typehintMatch['typehint'])) {
- return $typehintMatch['typehint'];
- }
- }
-
- return '';
- }
-
- private function getOptionalSign()
- {
- if (version_compare(PHP_VERSION, '7.1.0-dev', '>=') && $this->rfp->allowsNull() && !$this->rfp->isVariadic()) {
- return '?';
- }
-
- return '';
- }
-
- /**
- * Some internal classes have funny looking definitions...
- */
- public function getName()
- {
- $name = $this->rfp->getName();
- if (!$name || $name == '...') {
- $name = 'arg' . static::$parameterCounter++;
- }
-
- return $name;
- }
-
-
- /**
- * Variadics only introduced in 5.6
- */
- public function isVariadic()
- {
- return version_compare(PHP_VERSION, '5.6.0') >= 0 && $this->rfp->isVariadic();
- }
-}
diff --git a/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/CallTypeHintPass.php b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/CallTypeHintPass.php
deleted file mode 100644
index 4341486a07c..00000000000
--- a/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/CallTypeHintPass.php
+++ /dev/null
@@ -1,29 +0,0 @@
-requiresCallTypeHintRemoval()) {
- $code = str_replace(
- 'public function __call($method, array $args)',
- 'public function __call($method, $args)',
- $code
- );
- }
-
- if ($config->requiresCallStaticTypeHintRemoval()) {
- $code = str_replace(
- 'public static function __callStatic($method, array $args)',
- 'public static function __callStatic($method, $args)',
- $code
- );
- }
-
- return $code;
- }
-}
diff --git a/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/ClassNamePass.php b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/ClassNamePass.php
deleted file mode 100644
index d8ec67fad5b..00000000000
--- a/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/ClassNamePass.php
+++ /dev/null
@@ -1,31 +0,0 @@
-getNamespaceName();
-
- $namespace = ltrim($namespace, "\\");
-
- $className = $config->getShortName();
-
- $code = str_replace(
- 'namespace Mockery;',
- $namespace ? 'namespace ' . $namespace . ';' : '',
- $code
- );
-
- $code = str_replace(
- 'class Mock',
- 'class ' . $className,
- $code
- );
-
- return $code;
- }
-}
diff --git a/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/ClassPass.php b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/ClassPass.php
deleted file mode 100644
index b1a975040e3..00000000000
--- a/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/ClassPass.php
+++ /dev/null
@@ -1,50 +0,0 @@
-getTargetClass();
-
- if (!$target) {
- return $code;
- }
-
- if ($target->isFinal()) {
- return $code;
- }
-
- $className = ltrim($target->getName(), "\\");
- if (!class_exists($className)) {
- $targetCode = 'inNamespace()) {
- $targetCode.= 'namespace ' . $target->getNamespaceName(). '; ';
- }
-
- $targetCode.= 'class ' . $target->getShortName() . ' {} ';
-
- /*
- * We could eval here, but it doesn't play well with the way
- * PHPUnit tries to backup global state and the require definition
- * loader
- */
- $tmpfname = tempnam(sys_get_temp_dir(), "Mockery");
- file_put_contents($tmpfname, $targetCode);
- require $tmpfname;
- \Mockery::registerFileForCleanUp($tmpfname);
- }
-
- $code = str_replace(
- "implements MockInterface",
- "extends \\" . $className . " implements MockInterface",
- $code
- );
-
- return $code;
- }
-}
diff --git a/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/InstanceMockPass.php b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/InstanceMockPass.php
deleted file mode 100644
index e3bbf7dd424..00000000000
--- a/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/InstanceMockPass.php
+++ /dev/null
@@ -1,57 +0,0 @@
-_mockery_ignoreVerification = false;
- \$associatedRealObject = \Mockery::fetchMock(__CLASS__);
-
- foreach (get_object_vars(\$this) as \$attr => \$val) {
- if (\$attr !== "_mockery_ignoreVerification" && \$attr !== "_mockery_expectations") {
- \$this->\$attr = \$associatedRealObject->\$attr;
- }
- }
-
- \$directors = \$associatedRealObject->mockery_getExpectations();
- foreach (\$directors as \$method=>\$director) {
- \$expectations = \$director->getExpectations();
- // get the director method needed
- \$existingDirector = \$this->mockery_getExpectationsFor(\$method);
- if (!\$existingDirector) {
- \$existingDirector = new \Mockery\ExpectationDirector(\$method, \$this);
- \$this->mockery_setExpectationsFor(\$method, \$existingDirector);
- }
- foreach (\$expectations as \$expectation) {
- \$clonedExpectation = clone \$expectation;
- \$existingDirector->addExpectation(\$clonedExpectation);
- }
- }
- \Mockery::getContainer()->rememberMock(\$this);
- }
-MOCK;
-
- public function apply($code, MockConfiguration $config)
- {
- if ($config->isInstanceMock()) {
- $code = $this->appendToClass($code, static::INSTANCE_MOCK_CODE);
- }
-
- return $code;
- }
-
- protected function appendToClass($class, $code)
- {
- $lastBrace = strrpos($class, "}");
- $class = substr($class, 0, $lastBrace) . $code . "\n }\n";
- return $class;
- }
-}
diff --git a/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/InterfacePass.php b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/InterfacePass.php
deleted file mode 100644
index 152c7363a0f..00000000000
--- a/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/InterfacePass.php
+++ /dev/null
@@ -1,23 +0,0 @@
-getTargetInterfaces(), function ($code, $i) {
- return $code . ", \\" . $i->getName();
- }, "");
-
- $code = str_replace(
- "implements MockInterface",
- "implements MockInterface" . $interfaces,
- $code
- );
-
- return $code;
- }
-}
diff --git a/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/MethodDefinitionPass.php b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/MethodDefinitionPass.php
deleted file mode 100644
index 8a4139ae242..00000000000
--- a/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/MethodDefinitionPass.php
+++ /dev/null
@@ -1,150 +0,0 @@
-getMethodsToMock() as $method) {
- if ($method->isPublic()) {
- $methodDef = 'public';
- } elseif ($method->isProtected()) {
- $methodDef = 'protected';
- } else {
- $methodDef = 'private';
- }
-
- if ($method->isStatic()) {
- $methodDef .= ' static';
- }
-
- $methodDef .= ' function ';
- $methodDef .= $method->returnsReference() ? ' & ' : '';
- $methodDef .= $method->getName();
- $methodDef .= $this->renderParams($method, $config);
- $methodDef .= $this->renderReturnType($method);
- $methodDef .= $this->renderMethodBody($method, $config);
-
- $code = $this->appendToClass($code, $methodDef);
- }
-
- return $code;
- }
-
- protected function renderParams(Method $method, $config)
- {
- $class = $method->getDeclaringClass();
- if ($class->isInternal()) {
- $overrides = $config->getParameterOverrides();
-
- if (isset($overrides[strtolower($class->getName())][$method->getName()])) {
- return '(' . implode(',', $overrides[strtolower($class->getName())][$method->getName()]) . ')';
- }
- }
-
- $methodParams = array();
- $params = $method->getParameters();
- foreach ($params as $param) {
- $paramDef = $param->getTypeHintAsString();
- $paramDef .= $param->isPassedByReference() ? '&' : '';
- $paramDef .= $param->isVariadic() ? '...' : '';
- $paramDef .= '$' . $param->getName();
-
- if (!$param->isVariadic()) {
- if (false !== $param->isDefaultValueAvailable()) {
- $paramDef .= ' = ' . var_export($param->getDefaultValue(), true);
- } elseif ($param->isOptional()) {
- $paramDef .= ' = null';
- }
- }
-
- $methodParams[] = $paramDef;
- }
- return '(' . implode(', ', $methodParams) . ')';
- }
-
- protected function renderReturnType(Method $method)
- {
- $type = $method->getReturnType();
- return $type ? sprintf(': %s', $type) : '';
- }
-
- protected function appendToClass($class, $code)
- {
- $lastBrace = strrpos($class, "}");
- $class = substr($class, 0, $lastBrace) . $code . "\n }\n";
- return $class;
- }
-
- private function renderMethodBody($method, $config)
- {
- $invoke = $method->isStatic() ? 'static::_mockery_handleStaticMethodCall' : '$this->_mockery_handleMethodCall';
- $body = <<getDeclaringClass();
- $class_name = strtolower($class->getName());
- $overrides = $config->getParameterOverrides();
- if (isset($overrides[$class_name][$method->getName()])) {
- $params = array_values($overrides[$class_name][$method->getName()]);
- $paramCount = count($params);
- for ($i = 0; $i < $paramCount; ++$i) {
- $param = $params[$i];
- if (strpos($param, '&') !== false) {
- $body .= << $i) {
- \$argv[$i] = {$param};
-}
-
-BODY;
- }
- }
- } else {
- $params = array_values($method->getParameters());
- $paramCount = count($params);
- for ($i = 0; $i < $paramCount; ++$i) {
- $param = $params[$i];
- if (!$param->isPassedByReference()) {
- continue;
- }
- $body .= << $i) {
- \$argv[$i] =& \${$param->getName()};
-}
-
-BODY;
- }
- }
-
- $body .= $this->getReturnStatement($method, $invoke);
-
- return $body;
- }
-
- private function getReturnStatement($method, $invoke)
- {
- if ($method->getReturnType() === 'void') {
- return << '/public function __wakeup\(\)\s+\{.*?\}/sm',
- );
-
- public function apply($code, MockConfiguration $config)
- {
- $target = $config->getTargetClass();
-
- if (!$target) {
- return $code;
- }
-
- foreach ($target->getMethods() as $method) {
- if ($method->isFinal() && isset($this->methods[$method->getName()])) {
- $code = preg_replace($this->methods[$method->getName()], '', $code);
- }
- }
-
- return $code;
- }
-}
diff --git a/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/RemoveUnserializeForInternalSerializableClassesPass.php b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/RemoveUnserializeForInternalSerializableClassesPass.php
deleted file mode 100644
index ea73180b370..00000000000
--- a/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/RemoveUnserializeForInternalSerializableClassesPass.php
+++ /dev/null
@@ -1,40 +0,0 @@
-getTargetClass();
-
- if (!$target) {
- return $code;
- }
-
- if (!$target->hasInternalAncestor() || !$target->implementsInterface("Serializable")) {
- return $code;
- }
-
- $code = $this->appendToClass($code, self::DUMMY_METHOD_DEFINITION);
-
- return $code;
- }
-
- protected function appendToClass($class, $code)
- {
- $lastBrace = strrpos($class, "}");
- $class = substr($class, 0, $lastBrace) . $code . "\n }\n";
- return $class;
- }
-}
diff --git a/vendor/mockery/mockery/library/Mockery/Generator/StringManipulationGenerator.php b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulationGenerator.php
deleted file mode 100644
index cbed92243eb..00000000000
--- a/vendor/mockery/mockery/library/Mockery/Generator/StringManipulationGenerator.php
+++ /dev/null
@@ -1,34 +0,0 @@
-passes = $passes;
- }
-
- public function generate(MockConfiguration $config)
- {
- $code = file_get_contents(__DIR__ . '/../Mock.php');
- $className = $config->getName() ?: $config->generateName();
-
- $namedConfig = $config->rename($className);
-
- foreach ($this->passes as $pass) {
- $code = $pass->apply($code, $namedConfig);
- }
-
- return new MockDefinition($namedConfig, $code);
- }
-
- public function addPass(Pass $pass)
- {
- $this->passes[] = $pass;
- }
-}
diff --git a/vendor/mockery/mockery/library/Mockery/Generator/TargetClass.php b/vendor/mockery/mockery/library/Mockery/Generator/TargetClass.php
deleted file mode 100644
index 46dc198f6fb..00000000000
--- a/vendor/mockery/mockery/library/Mockery/Generator/TargetClass.php
+++ /dev/null
@@ -1,33 +0,0 @@
-name = $name;
- }
-
- public function getName()
- {
- return $this->name;
- }
-
- public function isAbstract()
- {
- return false;
- }
-
- public function isFinal()
- {
- return false;
- }
-
- public function getMethods()
- {
- return array();
- }
-
- public function getNamespaceName()
- {
- $parts = explode("\\", ltrim($this->getName(), "\\"));
- array_pop($parts);
- return implode("\\", $parts);
- }
-
- public function inNamespace()
- {
- return $this->getNamespaceName() !== '';
- }
-
- public function getShortName()
- {
- $parts = explode("\\", $this->getName());
- return array_pop($parts);
- }
-
- public function implementsInterface($interface)
- {
- return false;
- }
-
- public function hasInternalAncestor()
- {
- return false;
- }
-}
diff --git a/vendor/mockery/mockery/library/Mockery/Instantiator.php b/vendor/mockery/mockery/library/Mockery/Instantiator.php
deleted file mode 100644
index f396fd8cab5..00000000000
--- a/vendor/mockery/mockery/library/Mockery/Instantiator.php
+++ /dev/null
@@ -1,214 +0,0 @@
-.
- */
-
-namespace Mockery;
-
-use Closure;
-use ReflectionClass;
-use UnexpectedValueException;
-use InvalidArgumentException;
-
-/**
- * This is a trimmed down version of https://github.com/doctrine/instantiator,
- * basically without the caching
- *
- * @author Marco Pivetta
- */
-final class Instantiator
-{
- /**
- * Markers used internally by PHP to define whether {@see \unserialize} should invoke
- * the method {@see \Serializable::unserialize()} when dealing with classes implementing
- * the {@see \Serializable} interface.
- */
- const SERIALIZATION_FORMAT_USE_UNSERIALIZER = 'C';
- const SERIALIZATION_FORMAT_AVOID_UNSERIALIZER = 'O';
-
- /**
- * {@inheritDoc}
- */
- public function instantiate($className)
- {
- $factory = $this->buildFactory($className);
- $instance = $factory();
- $reflection = new ReflectionClass($instance);
-
- return $instance;
- }
-
- /**
- * @internal
- * @private
- *
- * Builds a {@see \Closure} capable of instantiating the given $className without
- * invoking its constructor.
- * This method is only exposed as public because of PHP 5.3 compatibility. Do not
- * use this method in your own code
- *
- * @param string $className
- *
- * @return Closure
- */
- public function buildFactory($className)
- {
- $reflectionClass = $this->getReflectionClass($className);
-
- if ($this->isInstantiableViaReflection($reflectionClass)) {
- return function () use ($reflectionClass) {
- return $reflectionClass->newInstanceWithoutConstructor();
- };
- }
-
- $serializedString = sprintf(
- '%s:%d:"%s":0:{}',
- $this->getSerializationFormat($reflectionClass),
- strlen($className),
- $className
- );
-
- $this->attemptInstantiationViaUnSerialization($reflectionClass, $serializedString);
-
- return function () use ($serializedString) {
- return unserialize($serializedString);
- };
- }
-
- /**
- * @param string $className
- *
- * @return ReflectionClass
- *
- * @throws InvalidArgumentException
- */
- private function getReflectionClass($className)
- {
- if (! class_exists($className)) {
- throw new InvalidArgumentException("Class:$className does not exist");
- }
-
- $reflection = new ReflectionClass($className);
-
- if ($reflection->isAbstract()) {
- throw new InvalidArgumentException("Class:$className is an abstract class");
- }
-
- return $reflection;
- }
-
- /**
- * @param ReflectionClass $reflectionClass
- * @param string $serializedString
- *
- * @throws UnexpectedValueException
- *
- * @return void
- */
- private function attemptInstantiationViaUnSerialization(ReflectionClass $reflectionClass, $serializedString)
- {
- set_error_handler(function ($code, $message, $file, $line) use ($reflectionClass, & $error) {
- $msg = sprintf(
- 'Could not produce an instance of "%s" via un-serialization, since an error was triggered in file "%s" at line "%d"',
- $reflectionClass->getName(),
- $file,
- $line
- );
-
- $error = new UnexpectedValueException($msg, 0, new \Exception($message, $code));
- });
-
- try {
- unserialize($serializedString);
- } catch (\Exception $exception) {
- restore_error_handler();
-
- throw new UnexpectedValueException("An exception was raised while trying to instantiate an instance of \"{$reflectionClass->getName()}\" via un-serialization", 0, $exception);
- }
-
- restore_error_handler();
-
- if ($error) {
- throw $error;
- }
- }
-
- /**
- * @param ReflectionClass $reflectionClass
- *
- * @return bool
- */
- private function isInstantiableViaReflection(ReflectionClass $reflectionClass)
- {
- if (\PHP_VERSION_ID >= 50600) {
- return ! ($reflectionClass->isInternal() && $reflectionClass->isFinal());
- }
-
- return \PHP_VERSION_ID >= 50400 && ! $this->hasInternalAncestors($reflectionClass);
- }
-
- /**
- * Verifies whether the given class is to be considered internal
- *
- * @param ReflectionClass $reflectionClass
- *
- * @return bool
- */
- private function hasInternalAncestors(ReflectionClass $reflectionClass)
- {
- do {
- if ($reflectionClass->isInternal()) {
- return true;
- }
- } while ($reflectionClass = $reflectionClass->getParentClass());
-
- return false;
- }
-
- /**
- * Verifies if the given PHP version implements the `Serializable` interface serialization
- * with an incompatible serialization format. If that's the case, use serialization marker
- * "C" instead of "O".
- *
- * @link http://news.php.net/php.internals/74654
- *
- * @param ReflectionClass $reflectionClass
- *
- * @return string the serialization format marker, either self::SERIALIZATION_FORMAT_USE_UNSERIALIZER
- * or self::SERIALIZATION_FORMAT_AVOID_UNSERIALIZER
- */
- private function getSerializationFormat(ReflectionClass $reflectionClass)
- {
- if ($this->isPhpVersionWithBrokenSerializationFormat()
- && $reflectionClass->implementsInterface('Serializable')
- ) {
- return self::SERIALIZATION_FORMAT_USE_UNSERIALIZER;
- }
-
- return self::SERIALIZATION_FORMAT_AVOID_UNSERIALIZER;
- }
-
- /**
- * Checks whether the current PHP runtime uses an incompatible serialization format
- *
- * @return bool
- */
- private function isPhpVersionWithBrokenSerializationFormat()
- {
- return PHP_VERSION_ID === 50429 || PHP_VERSION_ID === 50513;
- }
-}
diff --git a/vendor/mockery/mockery/library/Mockery/Loader.php b/vendor/mockery/mockery/library/Mockery/Loader.php
deleted file mode 100644
index 1afa86076d7..00000000000
--- a/vendor/mockery/mockery/library/Mockery/Loader.php
+++ /dev/null
@@ -1,155 +0,0 @@
-register();
- *
- * @author Jonathan H. Wage
- * @author Roman S. Borschel
- * @author Matthew Weier O'Phinney
- * @author Kris Wallsmith
- * @author Fabien Potencier
- */
-
-namespace Mockery;
-
-class Loader
-{
- private $_fileExtension = '.php';
- private $_namespace;
- private $_includePath;
- private $_namespaceSeparator = '\\';
-
- /**
- * Creates a new Loader that loads classes of the
- * specified namespace.
- *
- * @param string $ns The namespace to use.
- */
- public function __construct($ns = 'Mockery', $includePath = null)
- {
- $this->_namespace = $ns;
- $this->_includePath = $includePath;
- }
-
- /**
- * Sets the namespace separator used by classes in the namespace of this class loader.
- *
- * @param string $sep The separator to use.
- */
- public function setNamespaceSeparator($sep)
- {
- $this->_namespaceSeparator = $sep;
- }
-
- /**
- * Gets the namespace seperator used by classes in the namespace of this class loader.
- *
- * @return void
- */
- public function getNamespaceSeparator()
- {
- return $this->_namespaceSeparator;
- }
-
- /**
- * Sets the base include path for all class files in the namespace of this class loader.
- *
- * @param string $includePath
- */
- public function setIncludePath($includePath)
- {
- $this->_includePath = $includePath;
- }
-
- /**
- * Gets the base include path for all class files in the namespace of this class loader.
- *
- * @return string $includePath
- */
- public function getIncludePath()
- {
- return $this->_includePath;
- }
-
- /**
- * Sets the file extension of class files in the namespace of this class loader.
- *
- * @param string $fileExtension
- */
- public function setFileExtension($fileExtension)
- {
- $this->_fileExtension = $fileExtension;
- }
-
- /**
- * Gets the file extension of class files in the namespace of this class loader.
- *
- * @return string $fileExtension
- */
- public function getFileExtension()
- {
- return $this->_fileExtension;
- }
-
- /**
- * Installs this class loader on the SPL autoload stack.
- *
- * @param bool $prepend If true, prepend autoloader on the autoload stack
- */
- public function register($prepend = false)
- {
- spl_autoload_register(array($this, 'loadClass'), true, $prepend);
- }
-
- /**
- * Uninstalls this class loader from the SPL autoloader stack.
- */
- public function unregister()
- {
- spl_autoload_unregister(array($this, 'loadClass'));
- }
-
- /**
- * Loads the given class or interface.
- *
- * @param string $className The name of the class to load.
- * @return void
- */
- public function loadClass($className)
- {
- if ($className === 'Mockery') {
- require $this->getFullPath('Mockery.php');
- return;
- }
- if (null === $this->_namespace
- || $this->_namespace.$this->_namespaceSeparator === substr($className, 0, strlen($this->_namespace.$this->_namespaceSeparator))) {
- $fileName = '';
- $namespace = '';
- if (false !== ($lastNsPos = strripos($className, $this->_namespaceSeparator))) {
- $namespace = substr($className, 0, $lastNsPos);
- $className = substr($className, $lastNsPos + 1);
- $fileName = str_replace($this->_namespaceSeparator, DIRECTORY_SEPARATOR, $namespace) . DIRECTORY_SEPARATOR;
- }
- $fileName .= str_replace('_', DIRECTORY_SEPARATOR, $className) . $this->_fileExtension;
- require $this->getFullPath($fileName);
- }
- }
-
- /**
- * Returns full path for $fileName if _includePath is set, or leaves as-is for PHP's internal search in 'require'.
- *
- * @param string $fileName relative to include path.
- * @return string
- */
- private function getFullPath($fileName)
- {
- return ($this->_includePath !== null ? $this->_includePath . DIRECTORY_SEPARATOR : '') . $fileName;
- }
-}
diff --git a/vendor/mockery/mockery/library/Mockery/Loader/EvalLoader.php b/vendor/mockery/mockery/library/Mockery/Loader/EvalLoader.php
deleted file mode 100644
index b9d172afda4..00000000000
--- a/vendor/mockery/mockery/library/Mockery/Loader/EvalLoader.php
+++ /dev/null
@@ -1,18 +0,0 @@
-getClassName(), false)) {
- return;
- }
-
- eval("?>" . $definition->getCode());
- }
-}
diff --git a/vendor/mockery/mockery/library/Mockery/Loader/Loader.php b/vendor/mockery/mockery/library/Mockery/Loader/Loader.php
deleted file mode 100644
index d7401817325..00000000000
--- a/vendor/mockery/mockery/library/Mockery/Loader/Loader.php
+++ /dev/null
@@ -1,10 +0,0 @@
-path = $path;
- }
-
- public function load(MockDefinition $definition)
- {
- if (class_exists($definition->getClassName(), false)) {
- return;
- }
-
- $tmpfname = tempnam($this->path, "Mockery");
- file_put_contents($tmpfname, $definition->getCode());
-
- require $tmpfname;
- }
-}
diff --git a/vendor/mockery/mockery/library/Mockery/Matcher/Any.php b/vendor/mockery/mockery/library/Mockery/Matcher/Any.php
deleted file mode 100644
index 7b145457f8f..00000000000
--- a/vendor/mockery/mockery/library/Mockery/Matcher/Any.php
+++ /dev/null
@@ -1,46 +0,0 @@
-';
- }
-}
diff --git a/vendor/mockery/mockery/library/Mockery/Matcher/AnyOf.php b/vendor/mockery/mockery/library/Mockery/Matcher/AnyOf.php
deleted file mode 100644
index e95daafb849..00000000000
--- a/vendor/mockery/mockery/library/Mockery/Matcher/AnyOf.php
+++ /dev/null
@@ -1,51 +0,0 @@
-_expected as $exp) {
- if ($actual === $exp || $actual == $exp) {
- return true;
- }
- }
- return false;
- }
-
- /**
- * Return a string representation of this Matcher
- *
- * @return string
- */
- public function __toString()
- {
- return '';
- }
-}
diff --git a/vendor/mockery/mockery/library/Mockery/Matcher/Closure.php b/vendor/mockery/mockery/library/Mockery/Matcher/Closure.php
deleted file mode 100644
index 145f44b2af4..00000000000
--- a/vendor/mockery/mockery/library/Mockery/Matcher/Closure.php
+++ /dev/null
@@ -1,48 +0,0 @@
-_expected;
- $result = $closure($actual);
- return $result === true;
- }
-
- /**
- * Return a string representation of this Matcher
- *
- * @return string
- */
- public function __toString()
- {
- return '';
- }
-}
diff --git a/vendor/mockery/mockery/library/Mockery/Matcher/Contains.php b/vendor/mockery/mockery/library/Mockery/Matcher/Contains.php
deleted file mode 100644
index 649987d5a89..00000000000
--- a/vendor/mockery/mockery/library/Mockery/Matcher/Contains.php
+++ /dev/null
@@ -1,65 +0,0 @@
-_expected as $exp) {
- $match = false;
- foreach ($values as $val) {
- if ($exp === $val || $exp == $val) {
- $match = true;
- break;
- }
- }
- if ($match === false) {
- return false;
- }
- }
- return true;
- }
-
- /**
- * Return a string representation of this Matcher
- *
- * @return string
- */
- public function __toString()
- {
- $return = '_expected as $v) {
- $elements[] = (string) $v;
- }
- $return .= implode(', ', $elements) . ']>';
- return $return;
- }
-}
diff --git a/vendor/mockery/mockery/library/Mockery/Matcher/Ducktype.php b/vendor/mockery/mockery/library/Mockery/Matcher/Ducktype.php
deleted file mode 100644
index 93d8ab15030..00000000000
--- a/vendor/mockery/mockery/library/Mockery/Matcher/Ducktype.php
+++ /dev/null
@@ -1,54 +0,0 @@
-_expected as $method) {
- if (!method_exists($actual, $method)) {
- return false;
- }
- }
- return true;
- }
-
- /**
- * Return a string representation of this Matcher
- *
- * @return string
- */
- public function __toString()
- {
- return '_expected) . ']>';
- }
-}
diff --git a/vendor/mockery/mockery/library/Mockery/Matcher/HasKey.php b/vendor/mockery/mockery/library/Mockery/Matcher/HasKey.php
deleted file mode 100644
index ecad4e53e08..00000000000
--- a/vendor/mockery/mockery/library/Mockery/Matcher/HasKey.php
+++ /dev/null
@@ -1,47 +0,0 @@
-_expected, array_keys($actual));
- }
-
- /**
- * Return a string representation of this Matcher
- *
- * @return string
- */
- public function __toString()
- {
- $return = '_expected . ']>';
- return $return;
- }
-}
diff --git a/vendor/mockery/mockery/library/Mockery/Matcher/HasValue.php b/vendor/mockery/mockery/library/Mockery/Matcher/HasValue.php
deleted file mode 100644
index 2d7edff062a..00000000000
--- a/vendor/mockery/mockery/library/Mockery/Matcher/HasValue.php
+++ /dev/null
@@ -1,47 +0,0 @@
-_expected, $actual);
- }
-
- /**
- * Return a string representation of this Matcher
- *
- * @return string
- */
- public function __toString()
- {
- $return = '_expected . ']>';
- return $return;
- }
-}
diff --git a/vendor/mockery/mockery/library/Mockery/Matcher/MatcherAbstract.php b/vendor/mockery/mockery/library/Mockery/Matcher/MatcherAbstract.php
deleted file mode 100644
index 14903b64d0b..00000000000
--- a/vendor/mockery/mockery/library/Mockery/Matcher/MatcherAbstract.php
+++ /dev/null
@@ -1,59 +0,0 @@
-_expected = $expected;
- }
-
- /**
- * Check if the actual value matches the expected.
- * Actual passed by reference to preserve reference trail (where applicable)
- * back to the original method parameter.
- *
- * @param mixed $actual
- * @return bool
- */
- abstract public function match(&$actual);
-
- /**
- * Return a string representation of this Matcher
- *
- * @return string
- */
- abstract public function __toString();
-}
diff --git a/vendor/mockery/mockery/library/Mockery/Matcher/MustBe.php b/vendor/mockery/mockery/library/Mockery/Matcher/MustBe.php
deleted file mode 100644
index f5b3aeed40e..00000000000
--- a/vendor/mockery/mockery/library/Mockery/Matcher/MustBe.php
+++ /dev/null
@@ -1,50 +0,0 @@
-_expected === $actual;
- } else {
- return $this->_expected == $actual;
- }
- }
-
- /**
- * Return a string representation of this Matcher
- *
- * @return string
- */
- public function __toString()
- {
- return '';
- }
-}
diff --git a/vendor/mockery/mockery/library/Mockery/Matcher/Not.php b/vendor/mockery/mockery/library/Mockery/Matcher/Not.php
deleted file mode 100644
index 375d1baf798..00000000000
--- a/vendor/mockery/mockery/library/Mockery/Matcher/Not.php
+++ /dev/null
@@ -1,47 +0,0 @@
-_expected;
- }
-
- /**
- * Return a string representation of this Matcher
- *
- * @return string
- */
- public function __toString()
- {
- return '';
- }
-}
diff --git a/vendor/mockery/mockery/library/Mockery/Matcher/NotAnyOf.php b/vendor/mockery/mockery/library/Mockery/Matcher/NotAnyOf.php
deleted file mode 100644
index cbc2c429315..00000000000
--- a/vendor/mockery/mockery/library/Mockery/Matcher/NotAnyOf.php
+++ /dev/null
@@ -1,51 +0,0 @@
-_expected as $exp) {
- if ($actual === $exp || $actual == $exp) {
- return false;
- }
- }
- return true;
- }
-
- /**
- * Return a string representation of this Matcher
- *
- * @return string
- */
- public function __toString()
- {
- return '';
- }
-}
diff --git a/vendor/mockery/mockery/library/Mockery/Matcher/Subset.php b/vendor/mockery/mockery/library/Mockery/Matcher/Subset.php
deleted file mode 100644
index 3b8ae30d967..00000000000
--- a/vendor/mockery/mockery/library/Mockery/Matcher/Subset.php
+++ /dev/null
@@ -1,60 +0,0 @@
-_expected as $k=>$v) {
- if (!array_key_exists($k, $actual)) {
- return false;
- }
- if ($actual[$k] !== $v) {
- return false;
- }
- }
- return true;
- }
-
- /**
- * Return a string representation of this Matcher
- *
- * @return string
- */
- public function __toString()
- {
- $return = '_expected as $k=>$v) {
- $elements[] = $k . '=' . (string) $v;
- }
- $return .= implode(', ', $elements) . ']>';
- return $return;
- }
-}
diff --git a/vendor/mockery/mockery/library/Mockery/Matcher/Type.php b/vendor/mockery/mockery/library/Mockery/Matcher/Type.php
deleted file mode 100644
index cc3bf9a6393..00000000000
--- a/vendor/mockery/mockery/library/Mockery/Matcher/Type.php
+++ /dev/null
@@ -1,53 +0,0 @@
-_expected);
- if (function_exists($function)) {
- return $function($actual);
- } elseif (is_string($this->_expected)
- && (class_exists($this->_expected) || interface_exists($this->_expected))) {
- return $actual instanceof $this->_expected;
- }
- return false;
- }
-
- /**
- * Return a string representation of this Matcher
- *
- * @return string
- */
- public function __toString()
- {
- return '<' . ucfirst($this->_expected) . '>';
- }
-}
diff --git a/vendor/mockery/mockery/library/Mockery/MethodCall.php b/vendor/mockery/mockery/library/Mockery/MethodCall.php
deleted file mode 100644
index bc79b5f4073..00000000000
--- a/vendor/mockery/mockery/library/Mockery/MethodCall.php
+++ /dev/null
@@ -1,25 +0,0 @@
-method = $method;
- $this->args = $args;
- }
-
- public function getMethod()
- {
- return $this->method;
- }
-
- public function getArgs()
- {
- return $this->args;
- }
-}
diff --git a/vendor/mockery/mockery/library/Mockery/Mock.php b/vendor/mockery/mockery/library/Mockery/Mock.php
deleted file mode 100644
index c1875211fb1..00000000000
--- a/vendor/mockery/mockery/library/Mockery/Mock.php
+++ /dev/null
@@ -1,758 +0,0 @@
-_mockery_container = $container;
- if (!is_null($partialObject)) {
- $this->_mockery_partial = $partialObject;
- }
-
- if (!\Mockery::getConfiguration()->mockingNonExistentMethodsAllowed()) {
- foreach ($this->mockery_getMethods() as $method) {
- if ($method->isPublic() && !$method->isStatic()) {
- $this->_mockery_mockableMethods[] = $method->getName();
- }
- }
- }
- }
-
- /**
- * Set expected method calls
- *
- * @param mixed
- * @return \Mockery\Expectation
- */
- public function shouldReceive()
- {
- /** @var array $nonPublicMethods */
- $nonPublicMethods = $this->getNonPublicMethods();
-
- $self = $this;
- $allowMockingProtectedMethods = $this->_mockery_allowMockingProtectedMethods;
-
- $lastExpectation = \Mockery::parseShouldReturnArgs(
- $this, func_get_args(), function ($method) use ($self, $nonPublicMethods, $allowMockingProtectedMethods) {
- $rm = $self->mockery_getMethod($method);
- if ($rm) {
- if ($rm->isPrivate()) {
- throw new \InvalidArgumentException("$method() cannot be mocked as it is a private method");
- }
- if (!$allowMockingProtectedMethods && $rm->isProtected()) {
- throw new \InvalidArgumentException("$method() cannot be mocked as it a protected method and mocking protected methods is not allowed for this mock");
- }
- }
-
- $director = $self->mockery_getExpectationsFor($method);
- if (!$director) {
- $director = new \Mockery\ExpectationDirector($method, $self);
- $self->mockery_setExpectationsFor($method, $director);
- }
- $expectation = new \Mockery\Expectation($self, $method);
- $director->addExpectation($expectation);
- return $expectation;
- }
- );
- return $lastExpectation;
- }
-
- /**
- * Shortcut method for setting an expectation that a method should not be called.
- *
- * @param mixed
- * @return \Mockery\Expectation
- */
- public function shouldNotReceive()
- {
- $expectation = call_user_func_array(array($this, 'shouldReceive'), func_get_args());
- $expectation->never();
- return $expectation;
- }
-
- /**
- * Allows additional methods to be mocked that do not explicitly exist on mocked class
- * @param String $method name of the method to be mocked
- * @return Mock
- */
- public function shouldAllowMockingMethod($method)
- {
- $this->_mockery_mockableMethods[] = $method;
- return $this;
- }
-
- /**
- * Set mock to ignore unexpected methods and return Undefined class
- * @param mixed $returnValue the default return value for calls to missing functions on this mock
- * @return Mock
- */
- public function shouldIgnoreMissing($returnValue = null)
- {
- $this->_mockery_ignoreMissing = true;
- $this->_mockery_defaultReturnValue = $returnValue;
- return $this;
- }
-
- public function asUndefined()
- {
- $this->_mockery_ignoreMissing = true;
- $this->_mockery_defaultReturnValue = new \Mockery\Undefined;
- return $this;
- }
-
- /**
- * @return Mock
- */
- public function shouldAllowMockingProtectedMethods()
- {
- $this->_mockery_allowMockingProtectedMethods = true;
- return $this;
- }
-
-
- /**
- * Set mock to defer unexpected methods to it's parent
- *
- * This is particularly useless for this class, as it doesn't have a parent,
- * but included for completeness
- *
- * @return Mock
- */
- public function shouldDeferMissing()
- {
- $this->_mockery_deferMissing = true;
- return $this;
- }
-
- /**
- * Create an obviously worded alias to shouldDeferMissing()
- *
- * @return Mock
- */
- public function makePartial()
- {
- return $this->shouldDeferMissing();
- }
-
- /**
- * Accepts a closure which is executed with an object recorder which proxies
- * to the partial source object. The intent being to record the
- * interactions of a concrete object as a set of expectations on the
- * current mock object. The partial may then be passed to a second process
- * to see if it fulfils the same (or exact same) contract as the original.
- *
- * @param Closure $closure
- */
- public function shouldExpect(\Closure $closure)
- {
- $recorder = new \Mockery\Recorder($this, $this->_mockery_partial);
- $this->_mockery_disableExpectationMatching = true;
- $closure($recorder);
- $this->_mockery_disableExpectationMatching = false;
- return $this;
- }
-
- /**
- * In the event shouldReceive() accepting one or more methods/returns,
- * this method will switch them from normal expectations to default
- * expectations
- *
- * @return self
- */
- public function byDefault()
- {
- foreach ($this->_mockery_expectations as $director) {
- $exps = $director->getExpectations();
- foreach ($exps as $exp) {
- $exp->byDefault();
- }
- }
- return $this;
- }
-
- /**
- * Capture calls to this mock
- */
- public function __call($method, array $args)
- {
- return $this->_mockery_handleMethodCall($method, $args);
- }
-
- public static function __callStatic($method, array $args)
- {
- return self::_mockery_handleStaticMethodCall($method, $args);
- }
-
- /**
- * Forward calls to this magic method to the __call method
- */
- public function __toString()
- {
- return $this->__call('__toString', array());
- }
-
- /**public function __set($name, $value)
- {
- $this->_mockery_mockableProperties[$name] = $value;
- return $this;
- }
-
- public function __get($name)
- {
- if (isset($this->_mockery_mockableProperties[$name])) {
- return $this->_mockery_mockableProperties[$name];
- } elseif(isset($this->{$name})) {
- return $this->{$name};
- }
- throw new \InvalidArgumentException (
- 'Property ' . __CLASS__ . '::' . $name . ' does not exist on this mock object'
- );
- }**/
-
- /**
- * Iterate across all expectation directors and validate each
- *
- * @throws \Mockery\CountValidator\Exception
- * @return void
- */
- public function mockery_verify()
- {
- if ($this->_mockery_verified) {
- return true;
- }
- if (isset($this->_mockery_ignoreVerification)
- && $this->_mockery_ignoreVerification == true) {
- return true;
- }
- $this->_mockery_verified = true;
- foreach ($this->_mockery_expectations as $director) {
- $director->verify();
- }
- }
-
- /**
- * Tear down tasks for this mock
- *
- * @return void
- */
- public function mockery_teardown()
- {
- }
-
- /**
- * Fetch the next available allocation order number
- *
- * @return int
- */
- public function mockery_allocateOrder()
- {
- $this->_mockery_allocatedOrder += 1;
- return $this->_mockery_allocatedOrder;
- }
-
- /**
- * Set ordering for a group
- *
- * @param mixed $group
- * @param int $order
- */
- public function mockery_setGroup($group, $order)
- {
- $this->_mockery_groups[$group] = $order;
- }
-
- /**
- * Fetch array of ordered groups
- *
- * @return array
- */
- public function mockery_getGroups()
- {
- return $this->_mockery_groups;
- }
-
- /**
- * Set current ordered number
- *
- * @param int $order
- */
- public function mockery_setCurrentOrder($order)
- {
- $this->_mockery_currentOrder = $order;
- return $this->_mockery_currentOrder;
- }
-
- /**
- * Get current ordered number
- *
- * @return int
- */
- public function mockery_getCurrentOrder()
- {
- return $this->_mockery_currentOrder;
- }
-
- /**
- * Validate the current mock's ordering
- *
- * @param string $method
- * @param int $order
- * @throws \Mockery\Exception
- * @return void
- */
- public function mockery_validateOrder($method, $order)
- {
- if ($order < $this->_mockery_currentOrder) {
- $exception = new \Mockery\Exception\InvalidOrderException(
- 'Method ' . __CLASS__ . '::' . $method . '()'
- . ' called out of order: expected order '
- . $order . ', was ' . $this->_mockery_currentOrder
- );
- $exception->setMock($this)
- ->setMethodName($method)
- ->setExpectedOrder($order)
- ->setActualOrder($this->_mockery_currentOrder);
- throw $exception;
- }
- $this->mockery_setCurrentOrder($order);
- }
-
- /**
- * Gets the count of expectations for this mock
- *
- * @return int
- */
- public function mockery_getExpectationCount()
- {
- $count = 0;
- foreach ($this->_mockery_expectations as $director) {
- $count += $director->getExpectationCount();
- }
- return $count;
- }
-
- /**
- * Return the expectations director for the given method
- *
- * @var string $method
- * @return \Mockery\ExpectationDirector|null
- */
- public function mockery_setExpectationsFor($method, \Mockery\ExpectationDirector $director)
- {
- $this->_mockery_expectations[$method] = $director;
- }
-
- /**
- * Return the expectations director for the given method
- *
- * @var string $method
- * @return \Mockery\ExpectationDirector|null
- */
- public function mockery_getExpectationsFor($method)
- {
- if (isset($this->_mockery_expectations[$method])) {
- return $this->_mockery_expectations[$method];
- }
- }
-
- /**
- * Find an expectation matching the given method and arguments
- *
- * @var string $method
- * @var array $args
- * @return \Mockery\Expectation|null
- */
- public function mockery_findExpectation($method, array $args)
- {
- if (!isset($this->_mockery_expectations[$method])) {
- return null;
- }
- $director = $this->_mockery_expectations[$method];
-
- return $director->findExpectation($args);
- }
-
- /**
- * Return the container for this mock
- *
- * @return \Mockery\Container
- */
- public function mockery_getContainer()
- {
- return $this->_mockery_container;
- }
-
- /**
- * Return the name for this mock
- *
- * @return string
- */
- public function mockery_getName()
- {
- return __CLASS__;
- }
-
- /**
- * @return array
- */
- public function mockery_getMockableProperties()
- {
- return $this->_mockery_mockableProperties;
- }
-
- public function __isset($name)
- {
- if (false === stripos($name, '_mockery_') && method_exists(get_parent_class($this), '__isset')) {
- return parent::__isset($name);
- }
- }
-
- public function mockery_getExpectations()
- {
- return $this->_mockery_expectations;
- }
-
- /**
- * Calls a parent class method and returns the result. Used in a passthru
- * expectation where a real return value is required while still taking
- * advantage of expectation matching and call count verification.
- *
- * @param string $name
- * @param array $args
- * @return mixed
- */
- public function mockery_callSubjectMethod($name, array $args)
- {
- return call_user_func_array('parent::' . $name, $args);
- }
-
- /**
- * @return string[]
- */
- public function mockery_getMockableMethods()
- {
- return $this->_mockery_mockableMethods;
- }
-
- /**
- * @return bool
- */
- public function mockery_isAnonymous()
- {
- $rfc = new \ReflectionClass($this);
- return false === $rfc->getParentClass();
- }
-
- public function __wakeup()
- {
- /**
- * This does not add __wakeup method support. It's a blind method and any
- * expected __wakeup work will NOT be performed. It merely cuts off
- * annoying errors where a __wakeup exists but is not essential when
- * mocking
- */
- }
-
- public function mockery_getMethod($name)
- {
- foreach ($this->mockery_getMethods() as $method) {
- if ($method->getName() == $name) {
- return $method;
- }
- }
-
- return null;
- }
-
- public function shouldHaveReceived($method, $args = null)
- {
- $expectation = new \Mockery\VerificationExpectation($this, $method);
- if (null !== $args) {
- $expectation->withArgs($args);
- }
- $expectation->atLeast()->once();
- $director = new \Mockery\VerificationDirector($this->_mockery_getReceivedMethodCalls(), $expectation);
- $director->verify();
- return $director;
- }
-
- public function shouldNotHaveReceived($method, $args = null)
- {
- $expectation = new \Mockery\VerificationExpectation($this, $method);
- if (null !== $args) {
- $expectation->withArgs($args);
- }
- $expectation->never();
- $director = new \Mockery\VerificationDirector($this->_mockery_getReceivedMethodCalls(), $expectation);
- $director->verify();
- return null;
- }
-
- protected static function _mockery_handleStaticMethodCall($method, array $args)
- {
- try {
- $associatedRealObject = \Mockery::fetchMock(__CLASS__);
- return $associatedRealObject->__call($method, $args);
- } catch (\BadMethodCallException $e) {
- throw new \BadMethodCallException(
- 'Static method ' . $associatedRealObject->mockery_getName() . '::' . $method
- . '() does not exist on this mock object'
- );
- }
- }
-
- protected function _mockery_getReceivedMethodCalls()
- {
- return $this->_mockery_receivedMethodCalls ?: $this->_mockery_receivedMethodCalls = new \Mockery\ReceivedMethodCalls();
- }
-
- protected function _mockery_handleMethodCall($method, array $args)
- {
- $this->_mockery_getReceivedMethodCalls()->push(new \Mockery\MethodCall($method, $args));
-
- $rm = $this->mockery_getMethod($method);
- if ($rm && $rm->isProtected() && !$this->_mockery_allowMockingProtectedMethods) {
- if ($rm->isAbstract()) {
- return;
- }
-
- try {
- $prototype = $rm->getPrototype();
- if ($prototype->isAbstract()) {
- return;
- }
- } catch (\ReflectionException $re) {
- // noop - there is no hasPrototype method
- }
-
- return call_user_func_array("parent::$method", $args);
- }
-
- if (isset($this->_mockery_expectations[$method])
- && !$this->_mockery_disableExpectationMatching) {
- $handler = $this->_mockery_expectations[$method];
-
- try {
- return $handler->call($args);
- } catch (\Mockery\Exception\NoMatchingExpectationException $e) {
- if (!$this->_mockery_ignoreMissing && !$this->_mockery_deferMissing) {
- throw $e;
- }
- }
- }
-
- if (!is_null($this->_mockery_partial) && method_exists($this->_mockery_partial, $method)) {
- return call_user_func_array(array($this->_mockery_partial, $method), $args);
- } elseif ($this->_mockery_deferMissing && is_callable("parent::$method")) {
- return call_user_func_array("parent::$method", $args);
- } elseif ($method === '__toString') {
- // __toString is special because we force its addition to the class API regardless of the
- // original implementation. Thus, we should always return a string rather than honor
- // _mockery_ignoreMissing and break the API with an error.
- return sprintf("%s#%s", __CLASS__, spl_object_hash($this));
- } elseif ($this->_mockery_ignoreMissing) {
- if (\Mockery::getConfiguration()->mockingNonExistentMethodsAllowed() || (method_exists($this->_mockery_partial, $method) || is_callable("parent::$method"))) {
- if ($this->_mockery_defaultReturnValue instanceof \Mockery\Undefined) {
- return call_user_func_array(array($this->_mockery_defaultReturnValue, $method), $args);
- } else {
- return $this->_mockery_defaultReturnValue;
- }
- }
- }
- throw new \BadMethodCallException(
- 'Method ' . __CLASS__ . '::' . $method . '() does not exist on this mock object'
- );
- }
-
- protected function mockery_getMethods()
- {
- if (static::$_mockery_methods) {
- return static::$_mockery_methods;
- }
-
- $methods = array();
-
- if (isset($this->_mockery_partial)) {
- $reflected = new \ReflectionObject($this->_mockery_partial);
- $methods = $reflected->getMethods();
- } else {
- $reflected = new \ReflectionClass($this);
- foreach ($reflected->getMethods() as $method) {
- try {
- $methods[] = $method->getPrototype();
- } catch (\ReflectionException $re) {
- /**
- * For some reason, private methods don't have a prototype
- */
- if ($method->isPrivate()) {
- $methods[] = $method;
- }
- }
- }
- }
-
- return static::$_mockery_methods = $methods;
- }
-
- /**
- * @return array
- */
- private function getNonPublicMethods()
- {
- return array_map(
- function ($method) {
- return $method->getName();
- },
- array_filter($this->mockery_getMethods(), function ($method) {
- return !$method->isPublic();
- })
- );
- }
-}
diff --git a/vendor/mockery/mockery/library/Mockery/MockInterface.php b/vendor/mockery/mockery/library/Mockery/MockInterface.php
deleted file mode 100644
index a5112924df1..00000000000
--- a/vendor/mockery/mockery/library/Mockery/MockInterface.php
+++ /dev/null
@@ -1,242 +0,0 @@
-methodCalls[] = $methodCall;
- }
-
- public function verify(Expectation $expectation)
- {
- foreach ($this->methodCalls as $methodCall) {
- if ($methodCall->getMethod() !== $expectation->getName()) {
- continue;
- }
-
- if (!$expectation->matchArgs($methodCall->getArgs())) {
- continue;
- }
-
- $expectation->verifyCall($methodCall->getArgs());
- }
-
- $expectation->verify();
- }
-}
diff --git a/vendor/mockery/mockery/library/Mockery/Recorder.php b/vendor/mockery/mockery/library/Mockery/Recorder.php
deleted file mode 100644
index b9210f10538..00000000000
--- a/vendor/mockery/mockery/library/Mockery/Recorder.php
+++ /dev/null
@@ -1,103 +0,0 @@
-_mock = $mock;
- $this->_subject = $subject;
- }
-
- /**
- * Sets the recorded into strict mode where method calls are more strictly
- * matched against the argument and call count and ordering is also
- * set as enforceable.
- *
- * @return void
- */
- public function shouldBeStrict()
- {
- $this->_strict = true;
- }
-
- /**
- * Intercept all calls on the subject, and use the call details to create
- * a new expectation. The actual return value is then returned after being
- * recorded.
- *
- * @param string $method
- * @param array $args
- * @return mixed
- */
- public function __call($method, array $args)
- {
- $return = call_user_func_array(array($this->_subject, $method), $args);
- $expectation = $this->_mock->shouldReceive($method)->andReturn($return);
- if ($this->_strict) {
- $exactArgs = array();
- foreach ($args as $arg) {
- $exactArgs[] = \Mockery::mustBe($arg);
- }
- $expectation->once()->ordered();
- call_user_func_array(array($expectation, 'with'), $exactArgs);
- } else {
- call_user_func_array(array($expectation, 'with'), $args);
- }
- return $return;
- }
-}
diff --git a/vendor/mockery/mockery/library/Mockery/Undefined.php b/vendor/mockery/mockery/library/Mockery/Undefined.php
deleted file mode 100644
index e0fe424eda8..00000000000
--- a/vendor/mockery/mockery/library/Mockery/Undefined.php
+++ /dev/null
@@ -1,47 +0,0 @@
-receivedMethodCalls = $receivedMethodCalls;
- $this->expectation = $expectation;
- }
-
- public function verify()
- {
- return $this->receivedMethodCalls->verify($this->expectation);
- }
-
- public function with()
- {
- return $this->cloneApplyAndVerify("with", func_get_args());
- }
-
- public function withArgs(array $args)
- {
- return $this->cloneApplyAndVerify("withArgs", array($args));
- }
-
- public function withNoArgs()
- {
- return $this->cloneApplyAndVerify("withNoArgs", array());
- }
-
- public function withAnyArgs()
- {
- return $this->cloneApplyAndVerify("withAnyArgs", array());
- }
-
- public function times($limit = null)
- {
- return $this->cloneWithoutCountValidatorsApplyAndVerify("times", array($limit));
- }
-
- public function once()
- {
- return $this->cloneWithoutCountValidatorsApplyAndVerify("once", array());
- }
-
- public function twice()
- {
- return $this->cloneWithoutCountValidatorsApplyAndVerify("twice", array());
- }
-
- public function atLeast()
- {
- return $this->cloneWithoutCountValidatorsApplyAndVerify("atLeast", array());
- }
-
- public function atMost()
- {
- return $this->cloneWithoutCountValidatorsApplyAndVerify("atMost", array());
- }
-
- public function between($minimum, $maximum)
- {
- return $this->cloneWithoutCountValidatorsApplyAndVerify("between", array($minimum, $maximum));
- }
-
- protected function cloneWithoutCountValidatorsApplyAndVerify($method, $args)
- {
- $expectation = clone $this->expectation;
- $expectation->clearCountValidators();
- call_user_func_array(array($expectation, $method), $args);
- $director = new VerificationDirector($this->receivedMethodCalls, $expectation);
- $director->verify();
- return $director;
- }
-
- protected function cloneApplyAndVerify($method, $args)
- {
- $expectation = clone $this->expectation;
- call_user_func_array(array($expectation, $method), $args);
- $director = new VerificationDirector($this->receivedMethodCalls, $expectation);
- $director->verify();
- return $director;
- }
-}
diff --git a/vendor/mockery/mockery/library/Mockery/VerificationExpectation.php b/vendor/mockery/mockery/library/Mockery/VerificationExpectation.php
deleted file mode 100644
index 660c31fbc48..00000000000
--- a/vendor/mockery/mockery/library/Mockery/VerificationExpectation.php
+++ /dev/null
@@ -1,17 +0,0 @@
-_countValidators = array();
- }
-
- public function __clone()
- {
- parent::__clone();
- $this->_actualCount = 0;
- }
-}
diff --git a/vendor/mockery/mockery/package.xml b/vendor/mockery/mockery/package.xml
deleted file mode 100644
index 7216ad8b85b..00000000000
--- a/vendor/mockery/mockery/package.xml
+++ /dev/null
@@ -1,191 +0,0 @@
-
-
- Mockery
- pear.survivethedeepend.com
- Mockery is a simple yet flexible mock object framework for use in unit testing.
- Mockery is a simple yet flexible PHP mock object framework for use in unit testing with PHPUnit, PHPSpec or any other testing framework. Its core goal is to offer a test double framework with a succint API capable of clearly defining all possible object operations and interactions using a human readable Domain Specific Language (DSL). Designed as a drop in alternative to PHPUnit's phpunit-mock-objects library, Mockery is easy to integrate with PHPUnit and can operate alongside phpunit-mock-objects without the World ending.
-
- Pádraic Brady
- padraic
- padraic.brady@yahoo.com
- yes
-
-
- Dave Marshall
- davedevelopment
- dave.marshall@atstsolutions.co.uk
- yes
-
- 2014-04-29
- 20:26:00
-
- 0.9.1
- 0.9.1
-
-
- stable
- stable
-
- BSD
- http://github.com/padraic/mockery#readme
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 5.3.2
-
-
- 1.4.0
-
-
-
-
- Hamcrest
- hamcrest.googlecode.com/svn/pear
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/vendor/mockery/mockery/phpunit.xml.dist b/vendor/mockery/mockery/phpunit.xml.dist
deleted file mode 100644
index f1d0e09794d..00000000000
--- a/vendor/mockery/mockery/phpunit.xml.dist
+++ /dev/null
@@ -1,37 +0,0 @@
-
-
->
-
-
- ./tests
- ./tests/Mockery/MockingVariadicArgumentsTest.php
- ./tests/Mockery/MockingParameterAndReturnTypesTest.php
- ./tests/Mockery/MockingVariadicArgumentsTest.php
- ./tests/Mockery/MockingParameterAndReturnTypesTest.php
-
-
-
-
- ./library/
-
- ./library/Mockery/Adapter/Phpunit/MockeryPHPUnitIntegration.php
-
-
-
-
-
-
-
diff --git a/vendor/mockery/mockery/tests/Bootstrap.php b/vendor/mockery/mockery/tests/Bootstrap.php
deleted file mode 100644
index f685167a5c5..00000000000
--- a/vendor/mockery/mockery/tests/Bootstrap.php
+++ /dev/null
@@ -1,85 +0,0 @@
-=')) {
-
- /*
- * Add Mutateme library/ directory to the PHPUnit code coverage
- * whitelist. This has the effect that only production code source files
- * appear in the code coverage report and that all production code source
- * files, even those that are not covered by a test yet, are processed.
- */
- PHPUnit_Util_Filter::addDirectoryToWhitelist($library);
-
- /*
- * Omit from code coverage reports the contents of the tests directory
- */
- foreach (array('.php', '.phtml', '.csv', '.inc') as $suffix) {
- PHPUnit_Util_Filter::addDirectoryToFilter($tests, $suffix);
- }
- PHPUnit_Util_Filter::addDirectoryToFilter(PEAR_INSTALL_DIR);
- PHPUnit_Util_Filter::addDirectoryToFilter(PHP_LIBDIR);
-}
-
-require __DIR__.'/../vendor/autoload.php';
-
-/*
- * Unset global variables that are no longer needed.
- */
-unset($root, $library, $tests, $path);
diff --git a/vendor/mockery/mockery/tests/Mockery/AdhocTest.php b/vendor/mockery/mockery/tests/Mockery/AdhocTest.php
deleted file mode 100644
index 79381ebb06f..00000000000
--- a/vendor/mockery/mockery/tests/Mockery/AdhocTest.php
+++ /dev/null
@@ -1,90 +0,0 @@
-container = new \Mockery\Container(\Mockery::getDefaultGenerator(), \Mockery::getDefaultLoader());
- }
-
- public function teardown()
- {
- $this->container->mockery_close();
- }
-
- public function testSimplestMockCreation()
- {
- $m = $this->container->mock('MockeryTest_NameOfExistingClass');
- $this->assertTrue($m instanceof MockeryTest_NameOfExistingClass);
- }
-
- public function testMockeryInterfaceForClass()
- {
- $m = $this->container->mock('SplFileInfo');
- $this->assertTrue($m instanceof \Mockery\MockInterface);
- }
-
- public function testMockeryInterfaceForNonExistingClass()
- {
- $m = $this->container->mock('ABC_IDontExist');
- $this->assertTrue($m instanceof \Mockery\MockInterface);
- }
-
- public function testMockeryInterfaceForInterface()
- {
- $m = $this->container->mock('MockeryTest_NameOfInterface');
- $this->assertTrue($m instanceof \Mockery\MockInterface);
- }
-
- public function testMockeryInterfaceForAbstract()
- {
- $m = $this->container->mock('MockeryTest_NameOfAbstract');
- $this->assertTrue($m instanceof \Mockery\MockInterface);
- }
-
- public function testInvalidCountExceptionThrowsRuntimeExceptionOnIllegalComparativeSymbol()
- {
- $this->setExpectedException('Mockery\Exception\RuntimeException');
- $e = new \Mockery\Exception\InvalidCountException;
- $e->setExpectedCountComparative('X');
- }
-}
-
-class MockeryTest_NameOfExistingClass
-{
-}
-
-interface MockeryTest_NameOfInterface
-{
- public function foo();
-}
-
-abstract class MockeryTest_NameOfAbstract
-{
- abstract public function foo();
-}
diff --git a/vendor/mockery/mockery/tests/Mockery/ContainerTest.php b/vendor/mockery/mockery/tests/Mockery/ContainerTest.php
deleted file mode 100644
index d661dcebf61..00000000000
--- a/vendor/mockery/mockery/tests/Mockery/ContainerTest.php
+++ /dev/null
@@ -1,1744 +0,0 @@
-container = new Mockery\Container(Mockery::getDefaultGenerator(), new Mockery\Loader\EvalLoader());
- }
-
- public function teardown()
- {
- $this->container->mockery_close();
- }
-
- public function testSimplestMockCreation()
- {
- $m = $this->container->mock();
- $m->shouldReceive('foo')->andReturn('bar');
- $this->assertEquals('bar', $m->foo());
- }
-
- public function testGetKeyOfDemeterMockShouldReturnKeyWhenMatchingMock()
- {
- $m = $this->container->mock();
- $m->shouldReceive('foo->bar');
- $this->assertRegExp(
- '/Mockery_(\d+)__demeter_foo/',
- $this->container->getKeyOfDemeterMockFor('foo')
- );
- }
- public function testGetKeyOfDemeterMockShouldReturnNullWhenNoMatchingMock()
- {
- $method = 'unknownMethod';
- $this->assertNull($this->container->getKeyOfDemeterMockFor($method));
-
- $m = $this->container->mock();
- $m->shouldReceive('method');
- $this->assertNull($this->container->getKeyOfDemeterMockFor($method));
-
- $m->shouldReceive('foo->bar');
- $this->assertNull($this->container->getKeyOfDemeterMockFor($method));
- }
-
-
- public function testNamedMocksAddNameToExceptions()
- {
- $m = $this->container->mock('Foo');
- $m->shouldReceive('foo')->with(1)->andReturn('bar');
- try {
- $m->foo();
- } catch (\Mockery\Exception $e) {
- $this->assertTrue((bool) preg_match("/Foo/", $e->getMessage()));
- }
- }
-
- public function testSimpleMockWithArrayDefs()
- {
- $m = $this->container->mock(array('foo'=>1, 'bar'=>2));
- $this->assertEquals(1, $m->foo());
- $this->assertEquals(2, $m->bar());
- }
-
- public function testSimpleMockWithArrayDefsCanBeOverridden()
- {
- // eg. In shared test setup
- $m = $this->container->mock(array('foo' => 1, 'bar' => 2));
-
- // and then overridden in one test
- $m->shouldReceive('foo')->with('baz')->once()->andReturn(2);
- $m->shouldReceive('bar')->with('baz')->once()->andReturn(42);
-
- $this->assertEquals(2, $m->foo('baz'));
- $this->assertEquals(42, $m->bar('baz'));
- }
-
- public function testNamedMockWithArrayDefs()
- {
- $m = $this->container->mock('Foo', array('foo'=>1, 'bar'=>2));
- $this->assertEquals(1, $m->foo());
- $this->assertEquals(2, $m->bar());
- try {
- $m->f();
- } catch (BadMethodCallException $e) {
- $this->assertTrue((bool) preg_match("/Foo/", $e->getMessage()));
- }
- }
-
- public function testNamedMockWithArrayDefsCanBeOverridden()
- {
- // eg. In shared test setup
- $m = $this->container->mock('Foo', array('foo' => 1));
-
- // and then overridden in one test
- $m->shouldReceive('foo')->with('bar')->once()->andReturn(2);
-
- $this->assertEquals(2, $m->foo('bar'));
-
- try {
- $m->f();
- } catch (BadMethodCallException $e) {
- $this->assertTrue((bool) preg_match("/Foo/", $e->getMessage()));
- }
- }
-
- public function testNamedMockMultipleInterfaces()
- {
- $m = $this->container->mock('stdClass, ArrayAccess, Countable', array('foo'=>1, 'bar'=>2));
- $this->assertEquals(1, $m->foo());
- $this->assertEquals(2, $m->bar());
- try {
- $m->f();
- } catch (BadMethodCallException $e) {
- $this->assertTrue((bool) preg_match("/stdClass/", $e->getMessage()));
- $this->assertTrue((bool) preg_match("/ArrayAccess/", $e->getMessage()));
- $this->assertTrue((bool) preg_match("/Countable/", $e->getMessage()));
- }
- }
-
- public function testNamedMockWithConstructorArgs()
- {
- $m = $this->container->mock("MockeryTest_ClassConstructor2[foo]", array($param1 = new stdClass()));
- $m->shouldReceive("foo")->andReturn(123);
- $this->assertEquals(123, $m->foo());
- $this->assertEquals($param1, $m->getParam1());
- }
-
- public function testNamedMockWithConstructorArgsAndArrayDefs()
- {
- $m = $this->container->mock(
- "MockeryTest_ClassConstructor2[foo]",
- array($param1 = new stdClass()),
- array("foo" => 123)
- );
- $this->assertEquals(123, $m->foo());
- $this->assertEquals($param1, $m->getParam1());
- }
-
- public function testNamedMockWithConstructorArgsWithInternalCallToMockedMethod()
- {
- $m = $this->container->mock("MockeryTest_ClassConstructor2[foo]", array($param1 = new stdClass()));
- $m->shouldReceive("foo")->andReturn(123);
- $this->assertEquals(123, $m->bar());
- }
-
- public function testNamedMockWithConstructorArgsButNoQuickDefsShouldLeaveConstructorIntact()
- {
- $m = $this->container->mock("MockeryTest_ClassConstructor2", array($param1 = new stdClass()));
- $m->shouldDeferMissing();
- $this->assertEquals($param1, $m->getParam1());
- }
-
- public function testNamedMockWithShouldDeferMissing()
- {
- $m = $this->container->mock("MockeryTest_ClassConstructor2", array($param1 = new stdClass()));
- $m->shouldDeferMissing();
- $this->assertEquals('foo', $m->bar());
- $m->shouldReceive("bar")->andReturn(123);
- $this->assertEquals(123, $m->bar());
- }
-
- /**
- * @expectedException BadMethodCallException
- */
- public function testNamedMockWithShouldDeferMissingThrowsIfNotAvailable()
- {
- $m = $this->container->mock("MockeryTest_ClassConstructor2", array($param1 = new stdClass()));
- $m->shouldDeferMissing();
- $m->foorbar123();
- }
-
- public function testMockingAKnownConcreteClassSoMockInheritsClassType()
- {
- $m = $this->container->mock('stdClass');
- $m->shouldReceive('foo')->andReturn('bar');
- $this->assertEquals('bar', $m->foo());
- $this->assertTrue($m instanceof stdClass);
- }
-
- public function testMockingAKnownUserClassSoMockInheritsClassType()
- {
- $m = $this->container->mock('MockeryTest_TestInheritedType');
- $this->assertTrue($m instanceof MockeryTest_TestInheritedType);
- }
-
- public function testMockingAConcreteObjectCreatesAPartialWithoutError()
- {
- $m = $this->container->mock(new stdClass);
- $m->shouldReceive('foo')->andReturn('bar');
- $this->assertEquals('bar', $m->foo());
- $this->assertTrue($m instanceof stdClass);
- }
-
- public function testCreatingAPartialAllowsDynamicExpectationsAndPassesThroughUnexpectedMethods()
- {
- $m = $this->container->mock(new MockeryTestFoo);
- $m->shouldReceive('bar')->andReturn('bar');
- $this->assertEquals('bar', $m->bar());
- $this->assertEquals('foo', $m->foo());
- $this->assertTrue($m instanceof MockeryTestFoo);
- }
-
- public function testCreatingAPartialAllowsExpectationsToInterceptCallsToImplementedMethods()
- {
- $m = $this->container->mock(new MockeryTestFoo2);
- $m->shouldReceive('bar')->andReturn('baz');
- $this->assertEquals('baz', $m->bar());
- $this->assertEquals('foo', $m->foo());
- $this->assertTrue($m instanceof MockeryTestFoo2);
- }
-
- public function testBlockForwardingToPartialObject()
- {
- $m = $this->container->mock(new MockeryTestBar1, array('foo'=>1, Mockery\Container::BLOCKS => array('method1')));
- $this->assertSame($m, $m->method1());
- }
-
- public function testPartialWithArrayDefs()
- {
- $m = $this->container->mock(new MockeryTestBar1, array('foo'=>1, Mockery\Container::BLOCKS => array('method1')));
- $this->assertEquals(1, $m->foo());
- }
-
- public function testPassingClosureAsFinalParameterUsedToDefineExpectations()
- {
- $m = $this->container->mock('foo', function ($m) {
- $m->shouldReceive('foo')->once()->andReturn('bar');
- });
- $this->assertEquals('bar', $m->foo());
- }
-
- /**
- * @expectedException \Mockery\Exception
- */
- public function testMockingAKnownConcreteFinalClassThrowsErrors_OnlyPartialMocksCanMockFinalElements()
- {
- $m = $this->container->mock('MockeryFoo3');
- }
-
- public function testMockingAKnownConcreteClassWithFinalMethodsThrowsNoException()
- {
- $m = $this->container->mock('MockeryFoo4');
- }
-
- /**
- * @group finalclass
- */
- public function testFinalClassesCanBePartialMocks()
- {
- $m = $this->container->mock(new MockeryFoo3);
- $m->shouldReceive('foo')->andReturn('baz');
- $this->assertEquals('baz', $m->foo());
- $this->assertFalse($m instanceof MockeryFoo3);
- }
-
- public function testSplClassWithFinalMethodsCanBeMocked()
- {
- $m = $this->container->mock('SplFileInfo');
- $m->shouldReceive('foo')->andReturn('baz');
- $this->assertEquals('baz', $m->foo());
- $this->assertTrue($m instanceof SplFileInfo);
- }
-
- public function testSplClassWithFinalMethodsCanBeMockedMultipleTimes()
- {
- $this->container->mock('SplFileInfo');
- $m = $this->container->mock('SplFileInfo');
- $m->shouldReceive('foo')->andReturn('baz');
- $this->assertEquals('baz', $m->foo());
- $this->assertTrue($m instanceof SplFileInfo);
- }
-
- public function testClassesWithFinalMethodsCanBeProxyPartialMocks()
- {
- $m = $this->container->mock(new MockeryFoo4);
- $m->shouldReceive('foo')->andReturn('baz');
- $this->assertEquals('baz', $m->foo());
- $this->assertEquals('bar', $m->bar());
- $this->assertTrue($m instanceof MockeryFoo4);
- }
-
- public function testClassesWithFinalMethodsCanBeProperPartialMocks()
- {
- $m = $this->container->mock('MockeryFoo4[bar]');
- $m->shouldReceive('bar')->andReturn('baz');
- $this->assertEquals('baz', $m->foo());
- $this->assertEquals('baz', $m->bar());
- $this->assertTrue($m instanceof MockeryFoo4);
- }
-
- public function testClassesWithFinalMethodsCanBeProperPartialMocksButFinalMethodsNotPartialed()
- {
- $m = $this->container->mock('MockeryFoo4[foo]');
- $m->shouldReceive('foo')->andReturn('foo');
- $this->assertEquals('baz', $m->foo()); // partial expectation ignored - will fail callcount assertion
- $this->assertTrue($m instanceof MockeryFoo4);
- }
-
- public function testSplfileinfoClassMockPassesUserExpectations()
- {
- $file = $this->container->mock('SplFileInfo[getFilename,getPathname,getExtension,getMTime]', array(__FILE__));
- $file->shouldReceive('getFilename')->once()->andReturn('foo');
- $file->shouldReceive('getPathname')->once()->andReturn('path/to/foo');
- $file->shouldReceive('getExtension')->once()->andReturn('css');
- $file->shouldReceive('getMTime')->once()->andReturn(time());
- }
-
- public function testCanMockInterface()
- {
- $m = $this->container->mock('MockeryTest_Interface');
- $this->assertTrue($m instanceof MockeryTest_Interface);
- }
-
- public function testCanMockSpl()
- {
- $m = $this->container->mock('\\SplFixedArray');
- $this->assertTrue($m instanceof SplFixedArray);
- }
-
- public function testCanMockInterfaceWithAbstractMethod()
- {
- $m = $this->container->mock('MockeryTest_InterfaceWithAbstractMethod');
- $this->assertTrue($m instanceof MockeryTest_InterfaceWithAbstractMethod);
- $m->shouldReceive('foo')->andReturn(1);
- $this->assertEquals(1, $m->foo());
- }
-
- public function testCanMockAbstractWithAbstractProtectedMethod()
- {
- $m = $this->container->mock('MockeryTest_AbstractWithAbstractMethod');
- $this->assertTrue($m instanceof MockeryTest_AbstractWithAbstractMethod);
- }
-
- public function testCanMockInterfaceWithPublicStaticMethod()
- {
- $m = $this->container->mock('MockeryTest_InterfaceWithPublicStaticMethod');
- $this->assertTrue($m instanceof MockeryTest_InterfaceWithPublicStaticMethod);
- }
-
- public function testCanMockClassWithConstructor()
- {
- $m = $this->container->mock('MockeryTest_ClassConstructor');
- $this->assertTrue($m instanceof MockeryTest_ClassConstructor);
- }
-
- public function testCanMockClassWithConstructorNeedingClassArgs()
- {
- $m = $this->container->mock('MockeryTest_ClassConstructor2');
- $this->assertTrue($m instanceof MockeryTest_ClassConstructor2);
- }
-
- /**
- * @group partial
- */
- public function testCanPartiallyMockANormalClass()
- {
- $m = $this->container->mock('MockeryTest_PartialNormalClass[foo]');
- $this->assertTrue($m instanceof MockeryTest_PartialNormalClass);
- $m->shouldReceive('foo')->andReturn('cba');
- $this->assertEquals('abc', $m->bar());
- $this->assertEquals('cba', $m->foo());
- }
-
- /**
- * @group partial
- */
- public function testCanPartiallyMockAnAbstractClass()
- {
- $m = $this->container->mock('MockeryTest_PartialAbstractClass[foo]');
- $this->assertTrue($m instanceof MockeryTest_PartialAbstractClass);
- $m->shouldReceive('foo')->andReturn('cba');
- $this->assertEquals('abc', $m->bar());
- $this->assertEquals('cba', $m->foo());
- }
-
- /**
- * @group partial
- */
- public function testCanPartiallyMockANormalClassWith2Methods()
- {
- $m = $this->container->mock('MockeryTest_PartialNormalClass2[foo, baz]');
- $this->assertTrue($m instanceof MockeryTest_PartialNormalClass2);
- $m->shouldReceive('foo')->andReturn('cba');
- $m->shouldReceive('baz')->andReturn('cba');
- $this->assertEquals('abc', $m->bar());
- $this->assertEquals('cba', $m->foo());
- $this->assertEquals('cba', $m->baz());
- }
-
- /**
- * @group partial
- */
- public function testCanPartiallyMockAnAbstractClassWith2Methods()
- {
- $m = $this->container->mock('MockeryTest_PartialAbstractClass2[foo,baz]');
- $this->assertTrue($m instanceof MockeryTest_PartialAbstractClass2);
- $m->shouldReceive('foo')->andReturn('cba');
- $m->shouldReceive('baz')->andReturn('cba');
- $this->assertEquals('abc', $m->bar());
- $this->assertEquals('cba', $m->foo());
- $this->assertEquals('cba', $m->baz());
- }
-
- /**
- * @expectedException \Mockery\Exception
- * @group partial
- */
- public function testThrowsExceptionIfSettingExpectationForNonMockedMethodOfPartialMock()
- {
- $this->markTestSkipped('For now...');
- $m = $this->container->mock('MockeryTest_PartialNormalClass[foo]');
- $this->assertTrue($m instanceof MockeryTest_PartialNormalClass);
- $m->shouldReceive('bar')->andReturn('cba');
- }
-
- /**
- * @expectedException \Mockery\Exception
- * @group partial
- */
- public function testThrowsExceptionIfClassOrInterfaceForPartialMockDoesNotExist()
- {
- $m = $this->container->mock('MockeryTest_PartialNormalClassXYZ[foo]');
- }
-
- /**
- * @group issue/4
- */
- public function testCanMockClassContainingMagicCallMethod()
- {
- $m = $this->container->mock('MockeryTest_Call1');
- $this->assertTrue($m instanceof MockeryTest_Call1);
- }
-
- /**
- * @group issue/4
- */
- public function testCanMockClassContainingMagicCallMethodWithoutTypeHinting()
- {
- $m = $this->container->mock('MockeryTest_Call2');
- $this->assertTrue($m instanceof MockeryTest_Call2);
- }
-
- /**
- * @group issue/14
- */
- public function testCanMockClassContainingAPublicWakeupMethod()
- {
- $m = $this->container->mock('MockeryTest_Wakeup1');
- $this->assertTrue($m instanceof MockeryTest_Wakeup1);
- }
-
- /**
- * @group issue/18
- */
- public function testCanMockClassUsingMagicCallMethodsInPlaceOfNormalMethods()
- {
- $m = Mockery::mock('Gateway');
- $m->shouldReceive('iDoSomethingReallyCoolHere');
- $m->iDoSomethingReallyCoolHere();
- }
-
- /**
- * @group issue/18
- */
- public function testCanPartialMockObjectUsingMagicCallMethodsInPlaceOfNormalMethods()
- {
- $m = Mockery::mock(new Gateway);
- $m->shouldReceive('iDoSomethingReallyCoolHere');
- $m->iDoSomethingReallyCoolHere();
- }
-
- /**
- * @group issue/13
- */
- public function testCanMockClassWhereMethodHasReferencedParameter()
- {
- $m = Mockery::mock(new MockeryTest_MethodParamRef);
- }
-
- /**
- * @group issue/13
- */
- public function testCanPartiallyMockObjectWhereMethodHasReferencedParameter()
- {
- $m = Mockery::mock(new MockeryTest_MethodParamRef2);
- }
-
- /**
- * @group issue/11
- */
- public function testMockingAKnownConcreteClassCanBeGrantedAnArbitraryClassType()
- {
- $m = $this->container->mock('alias:MyNamespace\MyClass');
- $m->shouldReceive('foo')->andReturn('bar');
- $this->assertEquals('bar', $m->foo());
- $this->assertTrue($m instanceof MyNamespace\MyClass);
- }
-
- /**
- * @group issue/15
- */
- public function testCanMockMultipleInterfaces()
- {
- $m = $this->container->mock('MockeryTest_Interface1, MockeryTest_Interface2');
- $this->assertTrue($m instanceof MockeryTest_Interface1);
- $this->assertTrue($m instanceof MockeryTest_Interface2);
- }
-
- /**
- * @expectedException \Mockery\Exception
- */
- public function testMockingMultipleInterfacesThrowsExceptionWhenGivenNonExistingClassOrInterface()
- {
- $m = $this->container->mock('DoesNotExist, MockeryTest_Interface2');
- $this->assertTrue($m instanceof MockeryTest_Interface1);
- $this->assertTrue($m instanceof MockeryTest_Interface2);
- }
-
- /**
- * @group issue/15
- */
- public function testCanMockClassAndApplyMultipleInterfaces()
- {
- $m = $this->container->mock('MockeryTestFoo, MockeryTest_Interface1, MockeryTest_Interface2');
- $this->assertTrue($m instanceof MockeryTestFoo);
- $this->assertTrue($m instanceof MockeryTest_Interface1);
- $this->assertTrue($m instanceof MockeryTest_Interface2);
- }
-
- /**
- * @group issue/7
- *
- * Noted: We could complicate internally, but a blind class is better built
- * with a real class noted up front (stdClass is a perfect choice it is
- * behaviourless). Fine, it's a muddle - but we need to draw a line somewhere.
- */
- public function testCanMockStaticMethods()
- {
- Mockery::setContainer($this->container);
- $m = $this->container->mock('alias:MyNamespace\MyClass2');
- $m->shouldReceive('staticFoo')->andReturn('bar');
- $this->assertEquals('bar', \MyNameSpace\MyClass2::staticFoo());
- Mockery::resetContainer();
- }
-
- /**
- * @group issue/7
- * @expectedException \Mockery\CountValidator\Exception
- */
- public function testMockedStaticMethodsObeyMethodCounting()
- {
- Mockery::setContainer($this->container);
- $m = $this->container->mock('alias:MyNamespace\MyClass3');
- $m->shouldReceive('staticFoo')->once()->andReturn('bar');
- $this->container->mockery_verify();
- Mockery::resetContainer();
- }
-
- /**
- * @expectedException BadMethodCallException
- */
- public function testMockedStaticThrowsExceptionWhenMethodDoesNotExist()
- {
- Mockery::setContainer($this->container);
- $m = $this->container->mock('alias:MyNamespace\StaticNoMethod');
- $this->assertEquals('bar', MyNameSpace\StaticNoMethod::staticFoo());
- Mockery::resetContainer();
- }
-
- /**
- * @group issue/17
- */
- public function testMockingAllowsPublicPropertyStubbingOnRealClass()
- {
- $m = $this->container->mock('MockeryTestFoo');
- $m->foo = 'bar';
- $this->assertEquals('bar', $m->foo);
- //$this->assertTrue(array_key_exists('foo', $m->mockery_getMockableProperties()));
- }
-
- /**
- * @group issue/17
- */
- public function testMockingAllowsPublicPropertyStubbingOnNamedMock()
- {
- $m = $this->container->mock('Foo');
- $m->foo = 'bar';
- $this->assertEquals('bar', $m->foo);
- //$this->assertTrue(array_key_exists('foo', $m->mockery_getMockableProperties()));
- }
-
- /**
- * @group issue/17
- */
- public function testMockingAllowsPublicPropertyStubbingOnPartials()
- {
- $m = $this->container->mock(new stdClass);
- $m->foo = 'bar';
- $this->assertEquals('bar', $m->foo);
- //$this->assertTrue(array_key_exists('foo', $m->mockery_getMockableProperties()));
- }
-
- /**
- * @group issue/17
- */
- public function testMockingDoesNotStubNonStubbedPropertiesOnPartials()
- {
- $m = $this->container->mock(new MockeryTest_ExistingProperty);
- $this->assertEquals('bar', $m->foo);
- $this->assertFalse(array_key_exists('foo', $m->mockery_getMockableProperties()));
- }
-
- public function testCreationOfInstanceMock()
- {
- $m = $this->container->mock('overload:MyNamespace\MyClass4');
- $this->assertTrue($m instanceof MyNamespace\MyClass4);
- }
-
- public function testInstantiationOfInstanceMock()
- {
- Mockery::setContainer($this->container);
- $m = $this->container->mock('overload:MyNamespace\MyClass5');
- $instance = new MyNamespace\MyClass5;
- $this->assertTrue($instance instanceof MyNamespace\MyClass5);
- Mockery::resetContainer();
- }
-
- public function testInstantiationOfInstanceMockImportsExpectations()
- {
- Mockery::setContainer($this->container);
- $m = $this->container->mock('overload:MyNamespace\MyClass6');
- $m->shouldReceive('foo')->andReturn('bar');
- $instance = new MyNamespace\MyClass6;
- $this->assertEquals('bar', $instance->foo());
- Mockery::resetContainer();
- }
-
- public function testInstantiationOfInstanceMocksIgnoresVerificationOfOriginMock()
- {
- Mockery::setContainer($this->container);
- $m = $this->container->mock('overload:MyNamespace\MyClass7');
- $m->shouldReceive('foo')->once()->andReturn('bar');
- $this->container->mockery_verify();
- Mockery::resetContainer(); //should not throw an exception
- }
-
- /**
- * @expectedException \Mockery\CountValidator\Exception
- */
- public function testInstantiationOfInstanceMocksAddsThemToContainerForVerification()
- {
- Mockery::setContainer($this->container);
- $m = $this->container->mock('overload:MyNamespace\MyClass8');
- $m->shouldReceive('foo')->once();
- $instance = new MyNamespace\MyClass8;
- $this->container->mockery_verify();
- Mockery::resetContainer();
- }
-
- public function testInstantiationOfInstanceMocksDoesNotHaveCountValidatorCrossover()
- {
- Mockery::setContainer($this->container);
- $m = $this->container->mock('overload:MyNamespace\MyClass9');
- $m->shouldReceive('foo')->once();
- $instance1 = new MyNamespace\MyClass9;
- $instance2 = new MyNamespace\MyClass9;
- $instance1->foo();
- $instance2->foo();
- $this->container->mockery_verify();
- Mockery::resetContainer();
- }
-
- /**
- * @expectedException \Mockery\CountValidator\Exception
- */
- public function testInstantiationOfInstanceMocksDoesNotHaveCountValidatorCrossover2()
- {
- Mockery::setContainer($this->container);
- $m = $this->container->mock('overload:MyNamespace\MyClass10');
- $m->shouldReceive('foo')->once();
- $instance1 = new MyNamespace\MyClass10;
- $instance2 = new MyNamespace\MyClass10;
- $instance1->foo();
- $this->container->mockery_verify();
- Mockery::resetContainer();
- }
-
- public function testCreationOfInstanceMockWithFullyQualifiedName()
- {
- $m = $this->container->mock('overload:\MyNamespace\MyClass11');
- $this->assertTrue($m instanceof MyNamespace\MyClass11);
- }
-
- public function testInstanceMocksShouldIgnoreMissing()
- {
- Mockery::setContainer($this->container);
- $m = $this->container->mock('overload:MyNamespace\MyClass12');
- $m->shouldIgnoreMissing();
-
- $instance = new MyNamespace\MyClass12();
- $instance->foo();
-
- Mockery::resetContainer();
- }
-
- public function testMethodParamsPassedByReferenceHaveReferencePreserved()
- {
- $m = $this->container->mock('MockeryTestRef1');
- $m->shouldReceive('foo')->with(
- Mockery::on(function (&$a) {$a += 1;return true;}),
- Mockery::any()
- );
- $a = 1;
- $b = 1;
- $m->foo($a, $b);
- $this->assertEquals(2, $a);
- $this->assertEquals(1, $b);
- }
-
- /**
- * Meant to test the same logic as
- * testCanOverrideExpectedParametersOfExtensionPHPClassesToPreserveRefs,
- * but:
- * - doesn't require an extension
- * - isn't actually known to be used
- */
- public function testCanOverrideExpectedParametersOfInternalPHPClassesToPreserveRefs()
- {
- Mockery::getConfiguration()->setInternalClassMethodParamMap(
- 'DateTime', 'modify', array('&$string')
- );
- // @ used to avoid E_STRICT for incompatible signature
- @$m = $this->container->mock('DateTime');
- $this->assertInstanceOf("Mockery\MockInterface", $m, "Mocking failed, remove @ error suppresion to debug");
- $m->shouldReceive('modify')->with(
- Mockery::on(function (&$string) {$string = 'foo'; return true;})
- );
- $data ='bar';
- $m->modify($data);
- $this->assertEquals('foo', $data);
- $this->container->mockery_verify();
- Mockery::resetContainer();
- Mockery::getConfiguration()->resetInternalClassMethodParamMaps();
- }
-
- /**
- * Real world version of
- * testCanOverrideExpectedParametersOfInternalPHPClassesToPreserveRefs
- */
- public function testCanOverrideExpectedParametersOfExtensionPHPClassesToPreserveRefs()
- {
- if (!class_exists('MongoCollection', false)) {
- $this->markTestSkipped('ext/mongo not installed');
- }
- Mockery::getConfiguration()->setInternalClassMethodParamMap(
- 'MongoCollection', 'insert', array('&$data', '$options')
- );
- // @ used to avoid E_STRICT for incompatible signature
- @$m = $this->container->mock('MongoCollection');
- $this->assertInstanceOf("Mockery\MockInterface", $m, "Mocking failed, remove @ error suppresion to debug");
- $m->shouldReceive('insert')->with(
- Mockery::on(function (&$data) {$data['_id'] = 123; return true;}),
- Mockery::type('array')
- );
- $data = array('a'=>1,'b'=>2);
- $m->insert($data, array());
- $this->assertTrue(isset($data['_id']));
- $this->assertEquals(123, $data['_id']);
- $this->container->mockery_verify();
- Mockery::resetContainer();
- Mockery::getConfiguration()->resetInternalClassMethodParamMaps();
- }
-
- public function testCanCreateNonOverridenInstanceOfPreviouslyOverridenInternalClasses()
- {
- Mockery::getConfiguration()->setInternalClassMethodParamMap(
- 'DateTime', 'modify', array('&$string')
- );
- // @ used to avoid E_STRICT for incompatible signature
- @$m = $this->container->mock('DateTime');
- $this->assertInstanceOf("Mockery\MockInterface", $m, "Mocking failed, remove @ error suppresion to debug");
- $rc = new ReflectionClass($m);
- $rm = $rc->getMethod('modify');
- $params = $rm->getParameters();
- $this->assertTrue($params[0]->isPassedByReference());
-
- Mockery::getConfiguration()->resetInternalClassMethodParamMaps();
-
- $m = $this->container->mock('DateTime');
- $this->assertInstanceOf("Mockery\MockInterface", $m, "Mocking failed");
- $rc = new ReflectionClass($m);
- $rm = $rc->getMethod('modify');
- $params = $rm->getParameters();
- $this->assertFalse($params[0]->isPassedByReference());
-
- Mockery::resetContainer();
- Mockery::getConfiguration()->resetInternalClassMethodParamMaps();
- }
-
- /**
- * @group abstract
- */
- public function testCanMockAbstractClassWithAbstractPublicMethod()
- {
- $m = $this->container->mock('MockeryTest_AbstractWithAbstractPublicMethod');
- $this->assertTrue($m instanceof MockeryTest_AbstractWithAbstractPublicMethod);
- }
-
- /**
- * @issue issue/21
- */
- public function testClassDeclaringIssetDoesNotThrowException()
- {
- Mockery::setContainer($this->container);
- $m = $this->container->mock('MockeryTest_IssetMethod');
- $this->container->mockery_verify();
- Mockery::resetContainer();
- }
-
- /**
- * @issue issue/21
- */
- public function testClassDeclaringUnsetDoesNotThrowException()
- {
- Mockery::setContainer($this->container);
- $m = $this->container->mock('MockeryTest_UnsetMethod');
- $this->container->mockery_verify();
- Mockery::resetContainer();
- }
-
- /**
- * @issue issue/35
- */
- public function testCallingSelfOnlyReturnsLastMockCreatedOrCurrentMockBeingProgrammedSinceTheyAreOneAndTheSame()
- {
- Mockery::setContainer($this->container);
- $m = $this->container->mock('MockeryTestFoo');
- $this->assertFalse($this->container->self() instanceof MockeryTestFoo2);
- //$m = $this->container->mock('MockeryTestFoo2');
- //$this->assertTrue($this->container->self() instanceof MockeryTestFoo2);
- //$m = $this->container->mock('MockeryTestFoo');
- //$this->assertFalse(Mockery::self() instanceof MockeryTestFoo2);
- //$this->assertTrue(Mockery::self() instanceof MockeryTestFoo);
- Mockery::resetContainer();
- }
-
- /**
- * @issue issue/89
- */
- public function testCreatingMockOfClassWithExistingToStringMethodDoesntCreateClassWithTwoToStringMethods()
- {
- Mockery::setContainer($this->container);
- $m = $this->container->mock('MockeryTest_WithToString'); // this would fatal
- $m->shouldReceive("__toString")->andReturn('dave');
- $this->assertEquals("dave", "$m");
- }
-
- public function testGetExpectationCount_freshContainer()
- {
- $this->assertEquals(0, $this->container->mockery_getExpectationCount());
- }
-
- public function testGetExpectationCount_simplestMock()
- {
- $m = $this->container->mock();
- $m->shouldReceive('foo')->andReturn('bar');
- $this->assertEquals(1, $this->container->mockery_getExpectationCount());
- }
-
- public function testMethodsReturningParamsByReferenceDoesNotErrorOut()
- {
- $this->container->mock('MockeryTest_ReturnByRef');
- $mock = $this->container->mock('MockeryTest_ReturnByRef');
- $mock->shouldReceive("get")->andReturn($var = 123);
- $this->assertSame($var, $mock->get());
- }
-
- public function testMockCallableTypeHint()
- {
- if (PHP_VERSION_ID >= 50400) {
- $this->container->mock('MockeryTest_MockCallableTypeHint');
- }
- }
-
- public function testCanMockClassWithReservedWordMethod()
- {
- if (!extension_loaded("redis")) {
- $this->markTestSkipped("phpredis not installed");
- }
-
- $this->container->mock("Redis");
- }
-
- public function testUndeclaredClassIsDeclared()
- {
- $this->assertFalse(class_exists("BlahBlah"));
- $mock = $this->container->mock("BlahBlah");
- $this->assertInstanceOf("BlahBlah", $mock);
- }
-
- public function testUndeclaredClassWithNamespaceIsDeclared()
- {
- $this->assertFalse(class_exists("MyClasses\Blah\BlahBlah"));
- $mock = $this->container->mock("MyClasses\Blah\BlahBlah");
- $this->assertInstanceOf("MyClasses\Blah\BlahBlah", $mock);
- }
-
- public function testUndeclaredClassWithNamespaceIncludingLeadingOperatorIsDeclared()
- {
- $this->assertFalse(class_exists("\MyClasses\DaveBlah\BlahBlah"));
- $mock = $this->container->mock("\MyClasses\DaveBlah\BlahBlah");
- $this->assertInstanceOf("\MyClasses\DaveBlah\BlahBlah", $mock);
- }
-
- public function testMockingPhpredisExtensionClassWorks()
- {
- if (!class_exists('Redis')) {
- $this->markTestSkipped('PHPRedis extension required for this test');
- }
- $m = $this->container->mock('Redis');
- }
-
- public function testIssetMappingUsingProxiedPartials_CheckNoExceptionThrown()
- {
- $var = $this->container->mock(new MockeryTestIsset_Bar());
- $mock = $this->container->mock(new MockeryTestIsset_Foo($var));
- $mock->shouldReceive('bar')->once();
- $mock->bar();
- $this->container->mockery_teardown(); // closed by teardown()
- }
-
- /**
- * @group traversable1
- */
- public function testCanMockInterfacesExtendingTraversable()
- {
- $mock = $this->container->mock('MockeryTest_InterfaceWithTraversable');
- $this->assertInstanceOf('MockeryTest_InterfaceWithTraversable', $mock);
- $this->assertInstanceOf('ArrayAccess', $mock);
- $this->assertInstanceOf('Countable', $mock);
- $this->assertInstanceOf('Traversable', $mock);
- }
-
- /**
- * @group traversable2
- */
- public function testCanMockInterfacesAlongsideTraversable()
- {
- $mock = $this->container->mock('stdClass, ArrayAccess, Countable, Traversable');
- $this->assertInstanceOf('stdClass', $mock);
- $this->assertInstanceOf('ArrayAccess', $mock);
- $this->assertInstanceOf('Countable', $mock);
- $this->assertInstanceOf('Traversable', $mock);
- }
-
- public function testInterfacesCanHaveAssertions()
- {
- Mockery::setContainer($this->container);
- $m = $this->container->mock('stdClass, ArrayAccess, Countable, Traversable');
- $m->shouldReceive('foo')->once();
- $m->foo();
- $this->container->mockery_verify();
- Mockery::resetContainer();
- }
-
- public function testMockingIteratorAggregateDoesNotImplementIterator()
- {
- $mock = $this->container->mock('MockeryTest_ImplementsIteratorAggregate');
- $this->assertInstanceOf('IteratorAggregate', $mock);
- $this->assertInstanceOf('Traversable', $mock);
- $this->assertNotInstanceOf('Iterator', $mock);
- }
-
- public function testMockingInterfaceThatExtendsIteratorDoesNotImplementIterator()
- {
- $mock = $this->container->mock('MockeryTest_InterfaceThatExtendsIterator');
- $this->assertInstanceOf('Iterator', $mock);
- $this->assertInstanceOf('Traversable', $mock);
- }
-
- public function testMockingInterfaceThatExtendsIteratorAggregateDoesNotImplementIterator()
- {
- $mock = $this->container->mock('MockeryTest_InterfaceThatExtendsIteratorAggregate');
- $this->assertInstanceOf('IteratorAggregate', $mock);
- $this->assertInstanceOf('Traversable', $mock);
- $this->assertNotInstanceOf('Iterator', $mock);
- }
-
- public function testMockingIteratorAggregateDoesNotImplementIteratorAlongside()
- {
- $mock = $this->container->mock('IteratorAggregate');
- $this->assertInstanceOf('IteratorAggregate', $mock);
- $this->assertInstanceOf('Traversable', $mock);
- $this->assertNotInstanceOf('Iterator', $mock);
- }
-
- public function testMockingIteratorDoesNotImplementIteratorAlongside()
- {
- $mock = $this->container->mock('Iterator');
- $this->assertInstanceOf('Iterator', $mock);
- $this->assertInstanceOf('Traversable', $mock);
- }
-
- public function testMockingIteratorDoesNotImplementIterator()
- {
- $mock = $this->container->mock('MockeryTest_ImplementsIterator');
- $this->assertInstanceOf('Iterator', $mock);
- $this->assertInstanceOf('Traversable', $mock);
- }
-
- public function testMockeryCloseForIllegalIssetFileInclude()
- {
- $m = Mockery::mock('StdClass')
- ->shouldReceive('get')
- ->andReturn(false)
- ->getMock();
- $m->get();
- Mockery::close();
- }
-
- public function testMockeryShouldDistinguishBetweenConstructorParamsAndClosures()
- {
- $obj = new MockeryTestFoo();
- $mock = $this->container->mock('MockeryTest_ClassMultipleConstructorParams[dave]',
- array( &$obj, 'foo' ));
- }
-
- /** @group nette */
- public function testMockeryShouldNotMockCallstaticMagicMethod()
- {
- $mock = $this->container->mock('MockeryTest_CallStatic');
- }
-
- /**
- * @issue issue/139
- */
- public function testCanMockClassWithOldStyleConstructorAndArguments()
- {
- $mock = $this->container->mock('MockeryTest_OldStyleConstructor');
- }
-
- /** @group issue/144 */
- public function testMockeryShouldInterpretEmptyArrayAsConstructorArgs()
- {
- $mock = $this->container->mock("EmptyConstructorTest", array());
- $this->assertSame(0, $mock->numberOfConstructorArgs);
- }
-
- /** @group issue/144 */
- public function testMockeryShouldCallConstructorByDefaultWhenRequestingPartials()
- {
- $mock = $this->container->mock("EmptyConstructorTest[foo]");
- $this->assertSame(0, $mock->numberOfConstructorArgs);
- }
-
- /** @group issue/158 */
- public function testMockeryShouldRespectInterfaceWithMethodParamSelf()
- {
- $this->container->mock('MockeryTest_InterfaceWithMethodParamSelf');
- }
-
- /** @group issue/162 */
- public function testMockeryDoesntTryAndMockLowercaseToString()
- {
- $this->container->mock('MockeryTest_Lowercase_ToString');
- }
-
- /** @group issue/175 */
- public function testExistingStaticMethodMocking()
- {
- Mockery::setContainer($this->container);
- $mock = $this->container->mock('MockeryTest_PartialStatic[mockMe]');
-
- $mock->shouldReceive('mockMe')->with(5)->andReturn(10);
-
- $this->assertEquals(10, $mock::mockMe(5));
- $this->assertEquals(3, $mock::keepMe(3));
- }
-
- /**
- * @group issue/154
- * @expectedException InvalidArgumentException
- * @expectedExceptionMessage protectedMethod() cannot be mocked as it a protected method and mocking protected methods is not allowed for this mock
- */
- public function testShouldThrowIfAttemptingToStubProtectedMethod()
- {
- $mock = $this->container->mock('MockeryTest_WithProtectedAndPrivate');
- $mock->shouldReceive("protectedMethod");
- }
-
- /**
- * @group issue/154
- * @expectedException InvalidArgumentException
- * @expectedExceptionMessage privateMethod() cannot be mocked as it is a private method
- */
- public function testShouldThrowIfAttemptingToStubPrivateMethod()
- {
- $mock = $this->container->mock('MockeryTest_WithProtectedAndPrivate');
- $mock->shouldReceive("privateMethod");
- }
-
- public function testWakeupMagicIsNotMockedToAllowSerialisationInstanceHack()
- {
- $mock = $this->container->mock('DateTime');
- }
-
- /**
- * @group issue/154
- */
- public function testCanMockMethodsWithRequiredParamsThatHaveDefaultValues()
- {
- $mock = $this->container->mock('MockeryTest_MethodWithRequiredParamWithDefaultValue');
- $mock->shouldIgnoreMissing();
- $mock->foo(null, 123);
- }
-
- /**
- * @test
- * @group issue/294
- * @expectedException Mockery\Exception\RuntimeException
- * @expectedExceptionMessage Could not load mock DateTime, class already exists
- */
- public function testThrowsWhenNamedMockClassExistsAndIsNotMockery()
- {
- $builder = new MockConfigurationBuilder();
- $builder->setName("DateTime");
- $mock = $this->container->mock($builder);
- }
-
- /**
- * @expectedException Mockery\Exception\NoMatchingExpectationException
- * @expectedExceptionMessage MyTestClass::foo(resource(...))
- */
- public function testHandlesMethodWithArgumentExpectationWhenCalledWithResource()
- {
- $mock = $this->container->mock('MyTestClass');
- $mock->shouldReceive('foo')->with(array('yourself' => 21));
-
- $mock->foo(fopen('php://memory', 'r'));
- }
-
- /**
- * @expectedException Mockery\Exception\NoMatchingExpectationException
- * @expectedExceptionMessage MyTestClass::foo(array('myself'=>'array(...)',))
- */
- public function testHandlesMethodWithArgumentExpectationWhenCalledWithCircularArray()
- {
- $testArray = array();
- $testArray['myself'] =& $testArray;
-
- $mock = $this->container->mock('MyTestClass');
- $mock->shouldReceive('foo')->with(array('yourself' => 21));
-
- $mock->foo($testArray);
- }
-
- /**
- * @expectedException Mockery\Exception\NoMatchingExpectationException
- * @expectedExceptionMessage MyTestClass::foo(array('a_scalar'=>2,'an_array'=>'array(...)',))
- */
- public function testHandlesMethodWithArgumentExpectationWhenCalledWithNestedArray()
- {
- $testArray = array();
- $testArray['a_scalar'] = 2;
- $testArray['an_array'] = array(1, 2, 3);
-
- $mock = $this->container->mock('MyTestClass');
- $mock->shouldReceive('foo')->with(array('yourself' => 21));
-
- $mock->foo($testArray);
- }
-
- /**
- * @expectedException Mockery\Exception\NoMatchingExpectationException
- * @expectedExceptionMessage MyTestClass::foo(array('a_scalar'=>2,'an_object'=>'object(stdClass)',))
- */
- public function testHandlesMethodWithArgumentExpectationWhenCalledWithNestedObject()
- {
- $testArray = array();
- $testArray['a_scalar'] = 2;
- $testArray['an_object'] = new stdClass();
-
- $mock = $this->container->mock('MyTestClass');
- $mock->shouldReceive('foo')->with(array('yourself' => 21));
-
- $mock->foo($testArray);
- }
-
- /**
- * @expectedException Mockery\Exception\NoMatchingExpectationException
- * @expectedExceptionMessage MyTestClass::foo(array('a_scalar'=>2,'a_closure'=>'object(Closure
- */
- public function testHandlesMethodWithArgumentExpectationWhenCalledWithNestedClosure()
- {
- $testArray = array();
- $testArray['a_scalar'] = 2;
- $testArray['a_closure'] = function () {
- };
-
- $mock = $this->container->mock('MyTestClass');
- $mock->shouldReceive('foo')->with(array('yourself' => 21));
-
- $mock->foo($testArray);
- }
-
- /**
- * @expectedException Mockery\Exception\NoMatchingExpectationException
- * @expectedExceptionMessage MyTestClass::foo(array('a_scalar'=>2,'a_resource'=>'resource(...)',))
- */
- public function testHandlesMethodWithArgumentExpectationWhenCalledWithNestedResource()
- {
- $testArray = array();
- $testArray['a_scalar'] = 2;
- $testArray['a_resource'] = fopen('php://memory', 'r');
-
- $mock = $this->container->mock('MyTestClass');
- $mock->shouldReceive('foo')->with(array('yourself' => 21));
-
- $mock->foo($testArray);
- }
-
- /**
- * @test
- * @group issue/339
- */
- public function canMockClassesThatDescendFromInternalClasses()
- {
- $mock = $this->container->mock("MockeryTest_ClassThatDescendsFromInternalClass");
- $this->assertInstanceOf("DateTime", $mock);
- }
-
- /**
- * @test
- * @group issue/339
- */
- public function canMockClassesThatImplementSerializable()
- {
- $mock = $this->container->mock("MockeryTest_ClassThatImplementsSerializable");
- $this->assertInstanceOf("Serializable", $mock);
- }
-
- /**
- * @test
- * @group issue/346
- */
- public function canMockInternalClassesThatImplementSerializable()
- {
- $mock = $this->container->mock("ArrayObject");
- $this->assertInstanceOf("Serializable", $mock);
- }
-}
-
-class MockeryTest_CallStatic
-{
- public static function __callStatic($method, $args)
- {
- }
-}
-
-class MockeryTest_ClassMultipleConstructorParams
-{
- public function __construct($a, $b)
- {
- }
-
- public function dave()
- {
- }
-}
-
-interface MockeryTest_InterfaceWithTraversable extends ArrayAccess, Traversable, Countable
-{
- public function self();
-}
-
-class MockeryTestIsset_Bar
-{
- public function doSomething()
- {
- }
-}
-
-class MockeryTestIsset_Foo
-{
- private $var;
-
- public function __construct($var)
- {
- $this->var = $var;
- }
-
- public function __get($name)
- {
- $this->var->doSomething();
- }
-
- public function __isset($name)
- {
- return (bool) strlen($this->__get($name));
- }
-}
-
-class MockeryTest_IssetMethod
-{
- protected $_properties = array();
-
- public function __construct()
- {
- }
-
- public function __isset($property)
- {
- return isset($this->_properties[$property]);
- }
-}
-
-class MockeryTest_UnsetMethod
-{
- protected $_properties = array();
-
- public function __construct()
- {
- }
-
- public function __unset($property)
- {
- unset($this->_properties[$property]);
- }
-}
-
-class MockeryTestFoo
-{
- public function foo()
- {
- return 'foo';
- }
-}
-
-class MockeryTestFoo2
-{
- public function foo()
- {
- return 'foo';
- }
-
- public function bar()
- {
- return 'bar';
- }
-}
-
-final class MockeryFoo3
-{
- public function foo()
- {
- return 'baz';
- }
-}
-
-class MockeryFoo4
-{
- final public function foo()
- {
- return 'baz';
- }
-
- public function bar()
- {
- return 'bar';
- }
-}
-
-interface MockeryTest_Interface
-{
-}
-interface MockeryTest_Interface1
-{
-}
-interface MockeryTest_Interface2
-{
-}
-
-interface MockeryTest_InterfaceWithAbstractMethod
-{
- public function set();
-}
-
-interface MockeryTest_InterfaceWithPublicStaticMethod
-{
- public static function self();
-}
-
-abstract class MockeryTest_AbstractWithAbstractMethod
-{
- abstract protected function set();
-}
-
-class MockeryTest_WithProtectedAndPrivate
-{
- protected function protectedMethod()
- {
- }
-
- private function privateMethod()
- {
- }
-}
-
-class MockeryTest_ClassConstructor
-{
- public function __construct($param1)
- {
- }
-}
-
-class MockeryTest_ClassConstructor2
-{
- protected $param1;
-
- public function __construct(stdClass $param1)
- {
- $this->param1 = $param1;
- }
-
- public function getParam1()
- {
- return $this->param1;
- }
-
- public function foo()
- {
- return 'foo';
- }
-
- public function bar()
- {
- return $this->foo();
- }
-}
-
-class MockeryTest_Call1
-{
- public function __call($method, array $params)
- {
- }
-}
-
-class MockeryTest_Call2
-{
- public function __call($method, $params)
- {
- }
-}
-
-class MockeryTest_Wakeup1
-{
- public function __construct()
- {
- }
-
- public function __wakeup()
- {
- }
-}
-
-class MockeryTest_ExistingProperty
-{
- public $foo = 'bar';
-}
-
-abstract class MockeryTest_AbstractWithAbstractPublicMethod
-{
- abstract public function foo($a, $b);
-}
-
-// issue/18
-class SoCool
-{
- public function iDoSomethingReallyCoolHere()
- {
- return 3;
- }
-}
-
-class Gateway
-{
- public function __call($method, $args)
- {
- $m = new SoCool();
- return call_user_func_array(array($m, $method), $args);
- }
-}
-
-class MockeryTestBar1
-{
- public function method1()
- {
- return $this;
- }
-}
-
-class MockeryTest_ReturnByRef
-{
- public $i = 0;
-
- public function &get()
- {
- return $this->$i;
- }
-}
-
-class MockeryTest_MethodParamRef
-{
- public function method1(&$foo)
- {
- return true;
- }
-}
-class MockeryTest_MethodParamRef2
-{
- public function method1(&$foo)
- {
- return true;
- }
-}
-class MockeryTestRef1
-{
- public function foo(&$a, $b)
- {
- }
-}
-
-class MockeryTest_PartialNormalClass
-{
- public function foo()
- {
- return 'abc';
- }
-
- public function bar()
- {
- return 'abc';
- }
-}
-
-abstract class MockeryTest_PartialAbstractClass
-{
- abstract public function foo();
-
- public function bar()
- {
- return 'abc';
- }
-}
-
-class MockeryTest_PartialNormalClass2
-{
- public function foo()
- {
- return 'abc';
- }
-
- public function bar()
- {
- return 'abc';
- }
-
- public function baz()
- {
- return 'abc';
- }
-}
-
-abstract class MockeryTest_PartialAbstractClass2
-{
- abstract public function foo();
-
- public function bar()
- {
- return 'abc';
- }
-
- abstract public function baz();
-}
-
-class MockeryTest_TestInheritedType
-{
-}
-
-if (PHP_VERSION_ID >= 50400) {
- class MockeryTest_MockCallableTypeHint
- {
- public function foo(callable $baz)
- {
- $baz();
- }
-
- public function bar(callable $callback = null)
- {
- $callback();
- }
- }
-}
-
-class MockeryTest_WithToString
-{
- public function __toString()
- {
- }
-}
-
-class MockeryTest_ImplementsIteratorAggregate implements IteratorAggregate
-{
- public function getIterator()
- {
- return new ArrayIterator(array());
- }
-}
-
-class MockeryTest_ImplementsIterator implements Iterator
-{
- public function rewind()
- {
- }
-
- public function current()
- {
- }
-
- public function key()
- {
- }
-
- public function next()
- {
- }
-
- public function valid()
- {
- }
-}
-
-class MockeryTest_OldStyleConstructor
-{
- public function MockeryTest_OldStyleConstructor($arg)
- {
- }
-}
-
-class EmptyConstructorTest
-{
- public $numberOfConstructorArgs;
-
- public function __construct()
- {
- $this->numberOfConstructorArgs = count(func_get_args());
- }
-
- public function foo()
- {
- }
-}
-
-interface MockeryTest_InterfaceWithMethodParamSelf
-{
- public function foo(self $bar);
-}
-
-class MockeryTest_Lowercase_ToString
-{
- public function __tostring()
- {
- }
-}
-
-class MockeryTest_PartialStatic
-{
- public static function mockMe($a)
- {
- return $a;
- }
-
- public static function keepMe($b)
- {
- return $b;
- }
-}
-
-class MockeryTest_MethodWithRequiredParamWithDefaultValue
-{
- public function foo(DateTime $bar = null, $baz)
- {
- }
-}
-
-interface MockeryTest_InterfaceThatExtendsIterator extends Iterator
-{
- public function foo();
-}
-
-interface MockeryTest_InterfaceThatExtendsIteratorAggregate extends IteratorAggregate
-{
- public function foo();
-}
-
-class MockeryTest_ClassThatDescendsFromInternalClass extends DateTime
-{
-}
-
-class MockeryTest_ClassThatImplementsSerializable implements Serializable
-{
- public function serialize()
- {
- }
-
- public function unserialize($serialized)
- {
- }
-}
diff --git a/vendor/mockery/mockery/tests/Mockery/DemeterChainTest.php b/vendor/mockery/mockery/tests/Mockery/DemeterChainTest.php
deleted file mode 100644
index 9767f1eecca..00000000000
--- a/vendor/mockery/mockery/tests/Mockery/DemeterChainTest.php
+++ /dev/null
@@ -1,170 +0,0 @@
-mock */
- private $mock;
-
- public function setUp()
- {
- $this->mock = $this->mock = Mockery::mock('object')->shouldIgnoreMissing();
- }
-
- public function tearDown()
- {
- $this->mock->mockery_getContainer()->mockery_close();
- }
-
- public function testTwoChains()
- {
- $this->mock->shouldReceive('getElement->getFirst')
- ->once()
- ->andReturn('something');
-
- $this->mock->shouldReceive('getElement->getSecond')
- ->once()
- ->andReturn('somethingElse');
-
- $this->assertEquals(
- 'something',
- $this->mock->getElement()->getFirst()
- );
- $this->assertEquals(
- 'somethingElse',
- $this->mock->getElement()->getSecond()
- );
- $this->mock->mockery_getContainer()->mockery_close();
- }
-
- public function testTwoChainsWithExpectedParameters()
- {
- $this->mock->shouldReceive('getElement->getFirst')
- ->once()
- ->with('parameter')
- ->andReturn('something');
-
- $this->mock->shouldReceive('getElement->getSecond')
- ->once()
- ->with('secondParameter')
- ->andReturn('somethingElse');
-
- $this->assertEquals(
- 'something',
- $this->mock->getElement()->getFirst('parameter')
- );
- $this->assertEquals(
- 'somethingElse',
- $this->mock->getElement()->getSecond('secondParameter')
- );
- $this->mock->mockery_getContainer()->mockery_close();
- }
-
- public function testThreeChains()
- {
- $this->mock->shouldReceive('getElement->getFirst')
- ->once()
- ->andReturn('something');
-
- $this->mock->shouldReceive('getElement->getSecond')
- ->once()
- ->andReturn('somethingElse');
-
- $this->assertEquals(
- 'something',
- $this->mock->getElement()->getFirst()
- );
- $this->assertEquals(
- 'somethingElse',
- $this->mock->getElement()->getSecond()
- );
- $this->mock->shouldReceive('getElement->getFirst')
- ->once()
- ->andReturn('somethingNew');
- $this->assertEquals(
- 'somethingNew',
- $this->mock->getElement()->getFirst()
- );
- }
-
- public function testManyChains()
- {
- $this->mock->shouldReceive('getElements->getFirst')
- ->once()
- ->andReturn('something');
-
- $this->mock->shouldReceive('getElements->getSecond')
- ->once()
- ->andReturn('somethingElse');
-
- $this->mock->getElements()->getFirst();
- $this->mock->getElements()->getSecond();
- }
-
- public function testTwoNotRelatedChains()
- {
- $this->mock->shouldReceive('getElement->getFirst')
- ->once()
- ->andReturn('something');
-
- $this->mock->shouldReceive('getOtherElement->getSecond')
- ->once()
- ->andReturn('somethingElse');
-
- $this->assertEquals(
- 'somethingElse',
- $this->mock->getOtherElement()->getSecond()
- );
- $this->assertEquals(
- 'something',
- $this->mock->getElement()->getFirst()
- );
- }
-
- public function testDemeterChain()
- {
- $this->mock->shouldReceive('getElement->getFirst')
- ->once()
- ->andReturn('somethingElse');
-
- $this->assertEquals('somethingElse', $this->mock->getElement()->getFirst());
- }
-
- public function testMultiLevelDemeterChain()
- {
- $this->mock->shouldReceive('levelOne->levelTwo->getFirst')
- ->andReturn('first');
-
- $this->mock->shouldReceive('levelOne->levelTwo->getSecond')
- ->andReturn('second');
-
- $this->assertEquals(
- 'second',
- $this->mock->levelOne()->levelTwo()->getSecond()
- );
- $this->assertEquals(
- 'first',
- $this->mock->levelOne()->levelTwo()->getFirst()
- );
- }
-}
diff --git a/vendor/mockery/mockery/tests/Mockery/ExpectationTest.php b/vendor/mockery/mockery/tests/Mockery/ExpectationTest.php
deleted file mode 100644
index c3c31993fe9..00000000000
--- a/vendor/mockery/mockery/tests/Mockery/ExpectationTest.php
+++ /dev/null
@@ -1,2040 +0,0 @@
-container = new \Mockery\Container(\Mockery::getDefaultGenerator(), \Mockery::getDefaultLoader());
- $this->mock = $this->container->mock('foo');
- }
-
- public function teardown()
- {
- \Mockery::getConfiguration()->allowMockingNonExistentMethods(true);
- $this->container->mockery_close();
- }
-
- public function testReturnsNullWhenNoArgs()
- {
- $this->mock->shouldReceive('foo');
- $this->assertNull($this->mock->foo());
- }
-
- public function testReturnsNullWhenSingleArg()
- {
- $this->mock->shouldReceive('foo');
- $this->assertNull($this->mock->foo(1));
- }
-
- public function testReturnsNullWhenManyArgs()
- {
- $this->mock->shouldReceive('foo');
- $this->assertNull($this->mock->foo('foo', array(), new stdClass));
- }
-
- public function testReturnsNullIfNullIsReturnValue()
- {
- $this->mock->shouldReceive('foo')->andReturn(null);
- $this->assertNull($this->mock->foo());
- }
-
- public function testReturnsNullForMockedExistingClassIfAndreturnnullCalled()
- {
- $mock = $this->container->mock('MockeryTest_Foo');
- $mock->shouldReceive('foo')->andReturn(null);
- $this->assertNull($mock->foo());
- }
-
- public function testReturnsNullForMockedExistingClassIfNullIsReturnValue()
- {
- $mock = $this->container->mock('MockeryTest_Foo');
- $mock->shouldReceive('foo')->andReturnNull();
- $this->assertNull($mock->foo());
- }
-
- public function testReturnsSameValueForAllIfNoArgsExpectationAndNoneGiven()
- {
- $this->mock->shouldReceive('foo')->andReturn(1);
- $this->assertEquals(1, $this->mock->foo());
- }
-
- public function testSetsPublicPropertyWhenRequested()
- {
- $this->mock->bar = null;
- $this->mock->shouldReceive('foo')->andSet('bar', 'baz');
- $this->assertNull($this->mock->bar);
- $this->mock->foo();
- $this->assertEquals('baz', $this->mock->bar);
- }
-
- public function testSetsPublicPropertyWhenRequestedUsingAlias()
- {
- $this->mock->bar = null;
- $this->mock->shouldReceive('foo')->set('bar', 'baz');
- $this->assertNull($this->mock->bar);
- $this->mock->foo();
- $this->assertEquals('baz', $this->mock->bar);
- }
-
- public function testSetsPublicPropertiesWhenRequested()
- {
- $this->mock->bar = null;
- $this->mock->shouldReceive('foo')->andSet('bar', 'baz', 'bazz', 'bazzz');
- $this->assertNull($this->mock->bar);
- $this->mock->foo();
- $this->assertEquals('baz', $this->mock->bar);
- $this->mock->foo();
- $this->assertEquals('bazz', $this->mock->bar);
- $this->mock->foo();
- $this->assertEquals('bazzz', $this->mock->bar);
- }
-
- public function testSetsPublicPropertiesWhenRequestedUsingAlias()
- {
- $this->mock->bar = null;
- $this->mock->shouldReceive('foo')->set('bar', 'baz', 'bazz', 'bazzz');
- $this->assertAttributeEmpty('bar', $this->mock);
- $this->mock->foo();
- $this->assertEquals('baz', $this->mock->bar);
- $this->mock->foo();
- $this->assertEquals('bazz', $this->mock->bar);
- $this->mock->foo();
- $this->assertEquals('bazzz', $this->mock->bar);
- }
-
- public function testSetsPublicPropertiesWhenRequestedMoreTimesThanSetValues()
- {
- $this->mock->bar = null;
- $this->mock->shouldReceive('foo')->andSet('bar', 'baz', 'bazz');
- $this->assertNull($this->mock->bar);
- $this->mock->foo();
- $this->assertEquals('baz', $this->mock->bar);
- $this->mock->foo();
- $this->assertEquals('bazz', $this->mock->bar);
- $this->mock->foo();
- $this->assertEquals('bazz', $this->mock->bar);
- }
-
- public function testSetsPublicPropertiesWhenRequestedMoreTimesThanSetValuesUsingAlias()
- {
- $this->mock->bar = null;
- $this->mock->shouldReceive('foo')->andSet('bar', 'baz', 'bazz');
- $this->assertNull($this->mock->bar);
- $this->mock->foo();
- $this->assertEquals('baz', $this->mock->bar);
- $this->mock->foo();
- $this->assertEquals('bazz', $this->mock->bar);
- $this->mock->foo();
- $this->assertEquals('bazz', $this->mock->bar);
- }
-
- public function testSetsPublicPropertiesWhenRequestedMoreTimesThanSetValuesWithDirectSet()
- {
- $this->mock->bar = null;
- $this->mock->shouldReceive('foo')->andSet('bar', 'baz', 'bazz');
- $this->assertNull($this->mock->bar);
- $this->mock->foo();
- $this->assertEquals('baz', $this->mock->bar);
- $this->mock->foo();
- $this->assertEquals('bazz', $this->mock->bar);
- $this->mock->bar = null;
- $this->mock->foo();
- $this->assertNull($this->mock->bar);
- }
-
- public function testSetsPublicPropertiesWhenRequestedMoreTimesThanSetValuesWithDirectSetUsingAlias()
- {
- $this->mock->bar = null;
- $this->mock->shouldReceive('foo')->set('bar', 'baz', 'bazz');
- $this->assertNull($this->mock->bar);
- $this->mock->foo();
- $this->assertEquals('baz', $this->mock->bar);
- $this->mock->foo();
- $this->assertEquals('bazz', $this->mock->bar);
- $this->mock->bar = null;
- $this->mock->foo();
- $this->assertNull($this->mock->bar);
- }
-
- public function testReturnsSameValueForAllIfNoArgsExpectationAndSomeGiven()
- {
- $this->mock->shouldReceive('foo')->andReturn(1);
- $this->assertEquals(1, $this->mock->foo('foo'));
- }
-
- public function testReturnsValueFromSequenceSequentially()
- {
- $this->mock->shouldReceive('foo')->andReturn(1, 2, 3);
- $this->mock->foo('foo');
- $this->assertEquals(2, $this->mock->foo('foo'));
- }
-
- public function testReturnsValueFromSequenceSequentiallyAndRepeatedlyReturnsFinalValueOnExtraCalls()
- {
- $this->mock->shouldReceive('foo')->andReturn(1, 2, 3);
- $this->mock->foo('foo');
- $this->mock->foo('foo');
- $this->assertEquals(3, $this->mock->foo('foo'));
- $this->assertEquals(3, $this->mock->foo('foo'));
- }
-
- public function testReturnsValueFromSequenceSequentiallyAndRepeatedlyReturnsFinalValueOnExtraCallsWithManyAndReturnCalls()
- {
- $this->mock->shouldReceive('foo')->andReturn(1)->andReturn(2, 3);
- $this->mock->foo('foo');
- $this->mock->foo('foo');
- $this->assertEquals(3, $this->mock->foo('foo'));
- $this->assertEquals(3, $this->mock->foo('foo'));
- }
-
- public function testReturnsValueOfClosure()
- {
- $this->mock->shouldReceive('foo')->with(5)->andReturnUsing(function ($v) {return $v+1;});
- $this->assertEquals(6, $this->mock->foo(5));
- }
-
- public function testReturnsUndefined()
- {
- $this->mock->shouldReceive('foo')->andReturnUndefined();
- $this->assertTrue($this->mock->foo() instanceof \Mockery\Undefined);
- }
-
- public function testReturnsValuesSetAsArray()
- {
- $this->mock->shouldReceive('foo')->andReturnValues(array(1, 2, 3));
- $this->assertEquals(1, $this->mock->foo());
- $this->assertEquals(2, $this->mock->foo());
- $this->assertEquals(3, $this->mock->foo());
- }
-
- /**
- * @expectedException OutOfBoundsException
- */
- public function testThrowsException()
- {
- $this->mock->shouldReceive('foo')->andThrow(new OutOfBoundsException);
- $this->mock->foo();
- }
-
- /**
- * @expectedException OutOfBoundsException
- */
- public function testThrowsExceptionBasedOnArgs()
- {
- $this->mock->shouldReceive('foo')->andThrow('OutOfBoundsException');
- $this->mock->foo();
- }
-
- public function testThrowsExceptionBasedOnArgsWithMessage()
- {
- $this->mock->shouldReceive('foo')->andThrow('OutOfBoundsException', 'foo');
- try {
- $this->mock->foo();
- } catch (OutOfBoundsException $e) {
- $this->assertEquals('foo', $e->getMessage());
- }
- }
-
- /**
- * @expectedException OutOfBoundsException
- */
- public function testThrowsExceptionSequentially()
- {
- $this->mock->shouldReceive('foo')->andThrow(new Exception)->andThrow(new OutOfBoundsException);
- try {
- $this->mock->foo();
- } catch (Exception $e) {
- }
- $this->mock->foo();
- }
-
- public function testAndThrowExceptions()
- {
- $this->mock->shouldReceive('foo')->andThrowExceptions(array(
- new OutOfBoundsException,
- new InvalidArgumentException,
- ));
-
- try {
- $this->mock->foo();
- throw new Exception("Expected OutOfBoundsException, non thrown");
- } catch (\Exception $e) {
- $this->assertInstanceOf("OutOfBoundsException", $e, "Wrong or no exception thrown: {$e->getMessage()}");
- }
-
- try {
- $this->mock->foo();
- throw new Exception("Expected InvalidArgumentException, non thrown");
- } catch (\Exception $e) {
- $this->assertInstanceOf("InvalidArgumentException", $e, "Wrong or no exception thrown: {$e->getMessage()}");
- }
- }
-
- /**
- * @expectedException Mockery\Exception
- * @expectedExceptionMessage You must pass an array of exception objects to andThrowExceptions
- */
- public function testAndThrowExceptionsCatchNonExceptionArgument()
- {
- $this->mock
- ->shouldReceive('foo')
- ->andThrowExceptions(array('NotAnException'));
- }
-
- public function testMultipleExpectationsWithReturns()
- {
- $this->mock->shouldReceive('foo')->with(1)->andReturn(10);
- $this->mock->shouldReceive('bar')->with(2)->andReturn(20);
- $this->assertEquals(10, $this->mock->foo(1));
- $this->assertEquals(20, $this->mock->bar(2));
- }
-
- public function testExpectsNoArguments()
- {
- $this->mock->shouldReceive('foo')->withNoArgs();
- $this->mock->foo();
- }
-
- /**
- * @expectedException \Mockery\Exception
- */
- public function testExpectsNoArgumentsThrowsExceptionIfAnyPassed()
- {
- $this->mock->shouldReceive('foo')->withNoArgs();
- $this->mock->foo(1);
- }
-
- public function testExpectsArgumentsArray()
- {
- $this->mock->shouldReceive('foo')->withArgs(array(1, 2));
- $this->mock->foo(1, 2);
- }
-
- /**
- * @expectedException \Mockery\Exception
- */
- public function testExpectsArgumentsArrayThrowsExceptionIfPassedEmptyArray()
- {
- $this->mock->shouldReceive('foo')->withArgs(array());
- $this->mock->foo(1, 2);
- }
-
- /**
- * @expectedException \Mockery\Exception
- */
- public function testExpectsArgumentsArrayThrowsExceptionIfNoArgumentsPassed()
- {
- $this->mock->shouldReceive('foo')->with();
- $this->mock->foo(1);
- }
-
- /**
- * @expectedException \Mockery\Exception
- */
- public function testExpectsArgumentsArrayThrowsExceptionIfPassedWrongArguments()
- {
- $this->mock->shouldReceive('foo')->withArgs(array(1, 2));
- $this->mock->foo(3, 4);
- }
-
- /**
- * @expectedException \Mockery\Exception
- * @expectedExceptionMessageRegExp /foo\(NULL\)/
- */
- public function testExpectsStringArgumentExceptionMessageDifferentiatesBetweenNullAndEmptyString()
- {
- $this->mock->shouldReceive('foo')->withArgs(array('a string'));
- $this->mock->foo(null);
- }
-
- public function testExpectsAnyArguments()
- {
- $this->mock->shouldReceive('foo')->withAnyArgs();
- $this->mock->foo();
- $this->mock->foo(1);
- $this->mock->foo(1, 'k', new stdClass);
- }
-
- public function testExpectsArgumentMatchingRegularExpression()
- {
- $this->mock->shouldReceive('foo')->with('/bar/i');
- $this->mock->foo('xxBARxx');
- }
-
- public function testExpectsArgumentMatchingObjectType()
- {
- $this->mock->shouldReceive('foo')->with('\stdClass');
- $this->mock->foo(new stdClass);
- }
-
- /**
- * @expectedException \Mockery\Exception
- */
- public function testThrowsExceptionOnNoArgumentMatch()
- {
- $this->mock->shouldReceive('foo')->with(1);
- $this->mock->foo(2);
- }
-
- public function testNeverCalled()
- {
- $this->mock->shouldReceive('foo')->never();
- $this->container->mockery_verify();
- }
-
- public function testShouldNotReceive()
- {
- $this->mock->shouldNotReceive('foo');
- $this->container->mockery_verify();
- }
-
- /**
- * @expectedException \Mockery\Exception\InvalidCountException
- */
- public function testShouldNotReceiveThrowsExceptionIfMethodCalled()
- {
- $this->mock->shouldNotReceive('foo');
- $this->mock->foo();
- $this->container->mockery_verify();
- }
-
- /**
- * @expectedException \Mockery\Exception\InvalidCountException
- */
- public function testShouldNotReceiveWithArgumentThrowsExceptionIfMethodCalled()
- {
- $this->mock->shouldNotReceive('foo')->with(2);
- $this->mock->foo(2);
- $this->container->mockery_verify();
- }
-
- /**
- * @expectedException \Mockery\CountValidator\Exception
- */
- public function testNeverCalledThrowsExceptionOnCall()
- {
- $this->mock->shouldReceive('foo')->never();
- $this->mock->foo();
- $this->container->mockery_verify();
- }
-
- public function testCalledOnce()
- {
- $this->mock->shouldReceive('foo')->once();
- $this->mock->foo();
- $this->container->mockery_verify();
- }
-
- /**
- * @expectedException \Mockery\CountValidator\Exception
- */
- public function testCalledOnceThrowsExceptionIfNotCalled()
- {
- $this->mock->shouldReceive('foo')->once();
- $this->container->mockery_verify();
- }
-
- /**
- * @expectedException \Mockery\CountValidator\Exception
- */
- public function testCalledOnceThrowsExceptionIfCalledTwice()
- {
- $this->mock->shouldReceive('foo')->once();
- $this->mock->foo();
- $this->mock->foo();
- $this->container->mockery_verify();
- }
-
- public function testCalledTwice()
- {
- $this->mock->shouldReceive('foo')->twice();
- $this->mock->foo();
- $this->mock->foo();
- $this->container->mockery_verify();
- }
-
- /**
- * @expectedException \Mockery\CountValidator\Exception
- */
- public function testCalledTwiceThrowsExceptionIfNotCalled()
- {
- $this->mock->shouldReceive('foo')->twice();
- $this->container->mockery_verify();
- }
-
- /**
- * @expectedException \Mockery\CountValidator\Exception
- */
- public function testCalledOnceThrowsExceptionIfCalledThreeTimes()
- {
- $this->mock->shouldReceive('foo')->twice();
- $this->mock->foo();
- $this->mock->foo();
- $this->mock->foo();
- $this->container->mockery_verify();
- }
-
- public function testCalledZeroOrMoreTimesAtZeroCalls()
- {
- $this->mock->shouldReceive('foo')->zeroOrMoreTimes();
- $this->container->mockery_verify();
- }
-
- public function testCalledZeroOrMoreTimesAtThreeCalls()
- {
- $this->mock->shouldReceive('foo')->zeroOrMoreTimes();
- $this->mock->foo();
- $this->mock->foo();
- $this->mock->foo();
- $this->container->mockery_verify();
- }
-
- public function testTimesCountCalls()
- {
- $this->mock->shouldReceive('foo')->times(4);
- $this->mock->foo();
- $this->mock->foo();
- $this->mock->foo();
- $this->mock->foo();
- $this->container->mockery_verify();
- }
-
- /**
- * @expectedException \Mockery\CountValidator\Exception
- */
- public function testTimesCountCallThrowsExceptionOnTooFewCalls()
- {
- $this->mock->shouldReceive('foo')->times(2);
- $this->mock->foo();
- $this->container->mockery_verify();
- }
-
- /**
- * @expectedException \Mockery\CountValidator\Exception
- */
- public function testTimesCountCallThrowsExceptionOnTooManyCalls()
- {
- $this->mock->shouldReceive('foo')->times(2);
- $this->mock->foo();
- $this->mock->foo();
- $this->mock->foo();
- $this->container->mockery_verify();
- }
-
- public function testCalledAtLeastOnceAtExactlyOneCall()
- {
- $this->mock->shouldReceive('foo')->atLeast()->once();
- $this->mock->foo();
- $this->container->mockery_verify();
- }
-
- public function testCalledAtLeastOnceAtExactlyThreeCalls()
- {
- $this->mock->shouldReceive('foo')->atLeast()->times(3);
- $this->mock->foo();
- $this->mock->foo();
- $this->mock->foo();
- $this->container->mockery_verify();
- }
-
- /**
- * @expectedException \Mockery\CountValidator\Exception
- */
- public function testCalledAtLeastThrowsExceptionOnTooFewCalls()
- {
- $this->mock->shouldReceive('foo')->atLeast()->twice();
- $this->mock->foo();
- $this->container->mockery_verify();
- }
-
- public function testCalledAtMostOnceAtExactlyOneCall()
- {
- $this->mock->shouldReceive('foo')->atMost()->once();
- $this->mock->foo();
- $this->container->mockery_verify();
- }
-
- public function testCalledAtMostAtExactlyThreeCalls()
- {
- $this->mock->shouldReceive('foo')->atMost()->times(3);
- $this->mock->foo();
- $this->mock->foo();
- $this->mock->foo();
- $this->container->mockery_verify();
- }
-
- /**
- * @expectedException \Mockery\CountValidator\Exception
- */
- public function testCalledAtLeastThrowsExceptionOnTooManyCalls()
- {
- $this->mock->shouldReceive('foo')->atMost()->twice();
- $this->mock->foo();
- $this->mock->foo();
- $this->mock->foo();
- $this->container->mockery_verify();
- }
-
- /**
- * @expectedException \Mockery\CountValidator\Exception
- */
- public function testExactCountersOverrideAnyPriorSetNonExactCounters()
- {
- $this->mock->shouldReceive('foo')->atLeast()->once()->once();
- $this->mock->foo();
- $this->mock->foo();
- $this->container->mockery_verify();
- }
-
- public function testComboOfLeastAndMostCallsWithOneCall()
- {
- $this->mock->shouldReceive('foo')->atleast()->once()->atMost()->twice();
- $this->mock->foo();
- $this->container->mockery_verify();
- }
-
- public function testComboOfLeastAndMostCallsWithTwoCalls()
- {
- $this->mock->shouldReceive('foo')->atleast()->once()->atMost()->twice();
- $this->mock->foo();
- $this->mock->foo();
- $this->container->mockery_verify();
- }
-
- /**
- * @expectedException \Mockery\CountValidator\Exception
- */
- public function testComboOfLeastAndMostCallsThrowsExceptionAtTooFewCalls()
- {
- $this->mock->shouldReceive('foo')->atleast()->once()->atMost()->twice();
- $this->container->mockery_verify();
- }
-
- /**
- * @expectedException \Mockery\CountValidator\Exception
- */
- public function testComboOfLeastAndMostCallsThrowsExceptionAtTooManyCalls()
- {
- $this->mock->shouldReceive('foo')->atleast()->once()->atMost()->twice();
- $this->mock->foo();
- $this->mock->foo();
- $this->mock->foo();
- $this->container->mockery_verify();
- }
-
- public function testCallCountingOnlyAppliesToMatchedExpectations()
- {
- $this->mock->shouldReceive('foo')->with(1)->once();
- $this->mock->shouldReceive('foo')->with(2)->twice();
- $this->mock->shouldReceive('foo')->with(3);
- $this->mock->foo(1);
- $this->mock->foo(2);
- $this->mock->foo(2);
- $this->mock->foo(3);
- $this->container->mockery_verify();
- }
-
- /**
- * @expectedException \Mockery\CountValidator\Exception
- */
- public function testCallCountingThrowsExceptionOnAnyMismatch()
- {
- $this->mock->shouldReceive('foo')->with(1)->once();
- $this->mock->shouldReceive('foo')->with(2)->twice();
- $this->mock->shouldReceive('foo')->with(3);
- $this->mock->shouldReceive('bar');
- $this->mock->foo(1);
- $this->mock->foo(2);
- $this->mock->foo(3);
- $this->mock->bar();
- $this->container->mockery_verify();
- }
-
- public function testOrderedCallsWithoutError()
- {
- $this->mock->shouldReceive('foo')->ordered();
- $this->mock->shouldReceive('bar')->ordered();
- $this->mock->foo();
- $this->mock->bar();
- $this->container->mockery_verify();
- }
-
- /**
- * @expectedException \Mockery\Exception
- */
- public function testOrderedCallsWithOutOfOrderError()
- {
- $this->mock->shouldReceive('foo')->ordered();
- $this->mock->shouldReceive('bar')->ordered();
- $this->mock->bar();
- $this->mock->foo();
- $this->container->mockery_verify();
- }
-
- public function testDifferentArgumentsAndOrderingsPassWithoutException()
- {
- $this->mock->shouldReceive('foo')->with(1)->ordered();
- $this->mock->shouldReceive('foo')->with(2)->ordered();
- $this->mock->foo(1);
- $this->mock->foo(2);
- $this->container->mockery_verify();
- }
-
- /**
- * @expectedException \Mockery\Exception
- */
- public function testDifferentArgumentsAndOrderingsThrowExceptionWhenInWrongOrder()
- {
- $this->mock->shouldReceive('foo')->with(1)->ordered();
- $this->mock->shouldReceive('foo')->with(2)->ordered();
- $this->mock->foo(2);
- $this->mock->foo(1);
- $this->container->mockery_verify();
- }
-
- public function testUnorderedCallsIgnoredForOrdering()
- {
- $this->mock->shouldReceive('foo')->with(1)->ordered();
- $this->mock->shouldReceive('foo')->with(2);
- $this->mock->shouldReceive('foo')->with(3)->ordered();
- $this->mock->foo(2);
- $this->mock->foo(1);
- $this->mock->foo(2);
- $this->mock->foo(3);
- $this->mock->foo(2);
- $this->container->mockery_verify();
- }
-
- public function testOrderingOfDefaultGrouping()
- {
- $this->mock->shouldReceive('foo')->ordered();
- $this->mock->shouldReceive('bar')->ordered();
- $this->mock->foo();
- $this->mock->bar();
- $this->container->mockery_verify();
- }
-
- /**
- * @expectedException \Mockery\Exception
- */
- public function testOrderingOfDefaultGroupingThrowsExceptionOnWrongOrder()
- {
- $this->mock->shouldReceive('foo')->ordered();
- $this->mock->shouldReceive('bar')->ordered();
- $this->mock->bar();
- $this->mock->foo();
- $this->container->mockery_verify();
- }
-
- public function testOrderingUsingNumberedGroups()
- {
- $this->mock->shouldReceive('start')->ordered(1);
- $this->mock->shouldReceive('foo')->ordered(2);
- $this->mock->shouldReceive('bar')->ordered(2);
- $this->mock->shouldReceive('final')->ordered();
- $this->mock->start();
- $this->mock->bar();
- $this->mock->foo();
- $this->mock->bar();
- $this->mock->final();
- $this->container->mockery_verify();
- }
-
- public function testOrderingUsingNamedGroups()
- {
- $this->mock->shouldReceive('start')->ordered('start');
- $this->mock->shouldReceive('foo')->ordered('foobar');
- $this->mock->shouldReceive('bar')->ordered('foobar');
- $this->mock->shouldReceive('final')->ordered();
- $this->mock->start();
- $this->mock->bar();
- $this->mock->foo();
- $this->mock->bar();
- $this->mock->final();
- $this->container->mockery_verify();
- }
-
- /**
- * @group 2A
- */
- public function testGroupedUngroupedOrderingDoNotOverlap()
- {
- $s = $this->mock->shouldReceive('start')->ordered();
- $m = $this->mock->shouldReceive('mid')->ordered('foobar');
- $e = $this->mock->shouldReceive('end')->ordered();
- $this->assertTrue($s->getOrderNumber() < $m->getOrderNumber());
- $this->assertTrue($m->getOrderNumber() < $e->getOrderNumber());
- }
-
- /**
- * @expectedException \Mockery\Exception
- */
- public function testGroupedOrderingThrowsExceptionWhenCallsDisordered()
- {
- $this->mock->shouldReceive('foo')->ordered('first');
- $this->mock->shouldReceive('bar')->ordered('second');
- $this->mock->bar();
- $this->mock->foo();
- $this->container->mockery_verify();
- }
-
- public function testExpectationMatchingWithNoArgsOrderings()
- {
- $this->mock->shouldReceive('foo')->withNoArgs()->once()->ordered();
- $this->mock->shouldReceive('bar')->withNoArgs()->once()->ordered();
- $this->mock->shouldReceive('foo')->withNoArgs()->once()->ordered();
- $this->mock->foo();
- $this->mock->bar();
- $this->mock->foo();
- $this->container->mockery_verify();
- }
-
- public function testExpectationMatchingWithAnyArgsOrderings()
- {
- $this->mock->shouldReceive('foo')->withAnyArgs()->once()->ordered();
- $this->mock->shouldReceive('bar')->withAnyArgs()->once()->ordered();
- $this->mock->shouldReceive('foo')->withAnyArgs()->once()->ordered();
- $this->mock->foo();
- $this->mock->bar();
- $this->mock->foo();
- $this->container->mockery_verify();
- }
-
- public function testEnsuresOrderingIsNotCrossMockByDefault()
- {
- $this->mock->shouldReceive('foo')->ordered();
- $mock2 = $this->container->mock('bar');
- $mock2->shouldReceive('bar')->ordered();
- $mock2->bar();
- $this->mock->foo();
- }
-
- /**
- * @expectedException \Mockery\Exception
- */
- public function testEnsuresOrderingIsCrossMockWhenGloballyFlagSet()
- {
- $this->mock->shouldReceive('foo')->globally()->ordered();
- $mock2 = $this->container->mock('bar');
- $mock2->shouldReceive('bar')->globally()->ordered();
- $mock2->bar();
- $this->mock->foo();
- }
-
- public function testExpectationCastToStringFormatting()
- {
- $exp = $this->mock->shouldReceive('foo')->with(1, 'bar', new stdClass, array('Spam' => 'Ham', 'Bar' => 'Baz'));
- $this->assertEquals('[foo(1, "bar", object(stdClass), array(\'Spam\'=>\'Ham\',\'Bar\'=>\'Baz\',))]', (string) $exp);
- }
-
- public function testLongExpectationCastToStringFormatting()
- {
- $exp = $this->mock->shouldReceive('foo')->with(array('Spam' => 'Ham', 'Bar' => 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'Bar', 'Baz', 'End'));
- $this->assertEquals("[foo(array('Spam'=>'Ham','Bar'=>'Baz',0=>'Bar',1=>'Baz',2=>'Bar',3=>'Baz',4=>'Bar',5=>'Baz',6=>'Bar',7=>'Baz',8=>'Bar',9=>'Baz',10=>'Bar',11=>'Baz',12=>'Bar',13=>'Baz',14=>'Bar',15=>'Baz',16=>'Bar',17=>'Baz',18=>'Bar',19=>'Baz',20=>'Bar',21=>'Baz',22=>'Bar',23=>'Baz',24=>'Bar',25=>'Baz',26=>'Bar',27=>'Baz',28=>'Bar',29=>'Baz',30=>'Bar',31=>'Baz',32=>'Bar',33=>'Baz',34=>'Bar',35=>'Baz',36=>'Bar',37=>'Baz',38=>'Bar',39=>'Baz',40=>'Bar',41=>'Baz',42=>'Bar',43=>'Baz',44=>'Bar',45=>'Baz',46=>'Baz',47=>'Bar',48=>'Baz',49=>'Bar',50=>'Baz',51=>'Bar',52=>'Baz',53=>'Bar',54=>'Baz',55=>'Bar',56=>'Baz',57=>'Baz',58=>'Bar',59=>'Baz',60=>'Bar',61=>'Baz',62=>'Bar',63=>'Baz',64=>'Bar',65=>'Baz',66=>'Bar',67=>'Baz',68=>'Baz',69=>'Bar',70=>'Baz',71=>'Bar',72=>'Baz',73=>'Bar',74=>'Baz',75=>'Bar',76=>'Baz',77=>'Bar',78=>'Baz',79=>'Baz',80=>'Bar',81=>'Baz',82=>'Bar',83=>'Baz',84=>'Bar',85=>'Baz',86=>'Bar',87=>'Baz',88=>'Bar',89=>'Baz',90=>'Baz',91=>'Bar',92=>'Baz',93=>'Bar',94=>'Baz',95=>'Bar',96=>'Baz',97=>'Ba...))]", (string) $exp);
- }
-
- public function testMultipleExpectationCastToStringFormatting()
- {
- $exp = $this->mock->shouldReceive('foo', 'bar')->with(1);
- $this->assertEquals('[foo(1), bar(1)]', (string) $exp);
- }
-
- public function testGroupedOrderingWithLimitsAllowsMultipleReturnValues()
- {
- $this->mock->shouldReceive('foo')->with(2)->once()->andReturn('first');
- $this->mock->shouldReceive('foo')->with(2)->twice()->andReturn('second/third');
- $this->mock->shouldReceive('foo')->with(2)->andReturn('infinity');
- $this->assertEquals('first', $this->mock->foo(2));
- $this->assertEquals('second/third', $this->mock->foo(2));
- $this->assertEquals('second/third', $this->mock->foo(2));
- $this->assertEquals('infinity', $this->mock->foo(2));
- $this->assertEquals('infinity', $this->mock->foo(2));
- $this->assertEquals('infinity', $this->mock->foo(2));
- $this->container->mockery_verify();
- }
-
- public function testExpectationsCanBeMarkedAsDefaults()
- {
- $this->mock->shouldReceive('foo')->andReturn('bar')->byDefault();
- $this->assertEquals('bar', $this->mock->foo());
- $this->container->mockery_verify();
- }
-
- public function testDefaultExpectationsValidatedInCorrectOrder()
- {
- $this->mock->shouldReceive('foo')->with(1)->once()->andReturn('first')->byDefault();
- $this->mock->shouldReceive('foo')->with(2)->once()->andReturn('second')->byDefault();
- $this->assertEquals('first', $this->mock->foo(1));
- $this->assertEquals('second', $this->mock->foo(2));
- $this->container->mockery_verify();
- }
-
- public function testDefaultExpectationsAreReplacedByLaterConcreteExpectations()
- {
- $this->mock->shouldReceive('foo')->andReturn('bar')->once()->byDefault();
- $this->mock->shouldReceive('foo')->andReturn('bar')->twice();
- $this->mock->foo();
- $this->mock->foo();
- $this->container->mockery_verify();
- }
-
- public function testDefaultExpectationsCanBeChangedByLaterExpectations()
- {
- $this->mock->shouldReceive('foo')->with(1)->andReturn('bar')->once()->byDefault();
- $this->mock->shouldReceive('foo')->with(2)->andReturn('baz')->once();
- try {
- $this->mock->foo(1);
- $this->fail('Expected exception not thrown');
- } catch (\Mockery\Exception $e) {
- }
- $this->mock->foo(2);
- $this->container->mockery_verify();
- }
-
- /**
- * @expectedException \Mockery\Exception
- */
- public function testDefaultExpectationsCanBeOrdered()
- {
- $this->mock->shouldReceive('foo')->ordered()->byDefault();
- $this->mock->shouldReceive('bar')->ordered()->byDefault();
- $this->mock->bar();
- $this->mock->foo();
- $this->container->mockery_verify();
- }
-
- public function testDefaultExpectationsCanBeOrderedAndReplaced()
- {
- $this->mock->shouldReceive('foo')->ordered()->byDefault();
- $this->mock->shouldReceive('bar')->ordered()->byDefault();
- $this->mock->shouldReceive('bar')->ordered();
- $this->mock->shouldReceive('foo')->ordered();
- $this->mock->bar();
- $this->mock->foo();
- $this->container->mockery_verify();
- }
-
- public function testByDefaultOperatesFromMockConstruction()
- {
- $container = new \Mockery\Container(\Mockery::getDefaultGenerator(), \Mockery::getDefaultLoader());
- $mock = $container->mock('f', array('foo'=>'rfoo', 'bar'=>'rbar', 'baz'=>'rbaz'))->byDefault();
- $mock->shouldReceive('foo')->andReturn('foobar');
- $this->assertEquals('foobar', $mock->foo());
- $this->assertEquals('rbar', $mock->bar());
- $this->assertEquals('rbaz', $mock->baz());
- $mock->mockery_verify();
- }
-
- public function testByDefaultOnAMockDoesSquatWithoutExpectations()
- {
- $container = new \Mockery\Container(\Mockery::getDefaultGenerator(), \Mockery::getDefaultLoader());
- $mock = $container->mock('f')->byDefault();
- }
-
- public function testDefaultExpectationsCanBeOverridden()
- {
- $this->mock->shouldReceive('foo')->with('test')->andReturn('bar')->byDefault();
- $this->mock->shouldReceive('foo')->with('test')->andReturn('newbar')->byDefault();
- $this->mock->foo('test');
- $this->assertEquals('newbar', $this->mock->foo('test'));
- }
-
- /**
- * @expectedException \Mockery\Exception
- */
- public function testByDefaultPreventedFromSettingDefaultWhenDefaultingExpectationWasReplaced()
- {
- $exp = $this->mock->shouldReceive('foo')->andReturn(1);
- $this->mock->shouldReceive('foo')->andReturn(2);
- $exp->byDefault();
- }
-
- /**
- * Argument Constraint Tests
- */
-
- public function testAnyConstraintMatchesAnyArg()
- {
- $this->mock->shouldReceive('foo')->with(1, Mockery::any())->twice();
- $this->mock->foo(1, 2);
- $this->mock->foo(1, 'str');
- $this->container->mockery_verify();
- }
-
- public function testAnyConstraintNonMatchingCase()
- {
- $this->mock->shouldReceive('foo')->times(3);
- $this->mock->shouldReceive('foo')->with(1, Mockery::any())->never();
- $this->mock->foo();
- $this->mock->foo(1);
- $this->mock->foo(1, 2, 3);
- $this->container->mockery_verify();
- }
-
- public function testArrayConstraintMatchesArgument()
- {
- $this->mock->shouldReceive('foo')->with(Mockery::type('array'))->once();
- $this->mock->foo(array());
- $this->container->mockery_verify();
- }
-
- public function testArrayConstraintNonMatchingCase()
- {
- $this->mock->shouldReceive('foo')->times(3);
- $this->mock->shouldReceive('foo')->with(1, Mockery::type('array'))->never();
- $this->mock->foo();
- $this->mock->foo(1);
- $this->mock->foo(1, 2, 3);
- $this->container->mockery_verify();
- }
-
- /**
- * @expectedException \Mockery\Exception
- */
- public function testArrayConstraintThrowsExceptionWhenConstraintUnmatched()
- {
- $this->mock->shouldReceive('foo')->with(Mockery::type('array'))->once();
- $this->mock->foo(1);
- $this->container->mockery_verify();
- }
-
- public function testBoolConstraintMatchesArgument()
- {
- $this->mock->shouldReceive('foo')->with(Mockery::type('bool'))->once();
- $this->mock->foo(true);
- $this->container->mockery_verify();
- }
-
- public function testBoolConstraintNonMatchingCase()
- {
- $this->mock->shouldReceive('foo')->times(3);
- $this->mock->shouldReceive('foo')->with(1, Mockery::type('bool'))->never();
- $this->mock->foo();
- $this->mock->foo(1);
- $this->mock->foo(1, 2, 3);
- $this->container->mockery_verify();
- }
-
- /**
- * @expectedException \Mockery\Exception
- */
- public function testBoolConstraintThrowsExceptionWhenConstraintUnmatched()
- {
- $this->mock->shouldReceive('foo')->with(Mockery::type('bool'))->once();
- $this->mock->foo(1);
- $this->container->mockery_verify();
- }
-
- public function testCallableConstraintMatchesArgument()
- {
- $this->mock->shouldReceive('foo')->with(Mockery::type('callable'))->once();
- $this->mock->foo(function () {return 'f';});
- $this->container->mockery_verify();
- }
-
- public function testCallableConstraintNonMatchingCase()
- {
- $this->mock->shouldReceive('foo')->times(3);
- $this->mock->shouldReceive('foo')->with(1, Mockery::type('callable'))->never();
- $this->mock->foo();
- $this->mock->foo(1);
- $this->mock->foo(1, 2, 3);
- $this->container->mockery_verify();
- }
-
- /**
- * @expectedException \Mockery\Exception
- */
- public function testCallableConstraintThrowsExceptionWhenConstraintUnmatched()
- {
- $this->mock->shouldReceive('foo')->with(Mockery::type('callable'))->once();
- $this->mock->foo(1);
- $this->container->mockery_verify();
- }
-
- public function testDoubleConstraintMatchesArgument()
- {
- $this->mock->shouldReceive('foo')->with(Mockery::type('double'))->once();
- $this->mock->foo(2.25);
- $this->container->mockery_verify();
- }
-
- public function testDoubleConstraintNonMatchingCase()
- {
- $this->mock->shouldReceive('foo')->times(3);
- $this->mock->shouldReceive('foo')->with(1, Mockery::type('double'))->never();
- $this->mock->foo();
- $this->mock->foo(1);
- $this->mock->foo(1, 2, 3);
- $this->container->mockery_verify();
- }
-
- /**
- * @expectedException \Mockery\Exception
- */
- public function testDoubleConstraintThrowsExceptionWhenConstraintUnmatched()
- {
- $this->mock->shouldReceive('foo')->with(Mockery::type('double'))->once();
- $this->mock->foo(1);
- $this->container->mockery_verify();
- }
-
- public function testFloatConstraintMatchesArgument()
- {
- $this->mock->shouldReceive('foo')->with(Mockery::type('float'))->once();
- $this->mock->foo(2.25);
- $this->container->mockery_verify();
- }
-
- public function testFloatConstraintNonMatchingCase()
- {
- $this->mock->shouldReceive('foo')->times(3);
- $this->mock->shouldReceive('foo')->with(1, Mockery::type('float'))->never();
- $this->mock->foo();
- $this->mock->foo(1);
- $this->mock->foo(1, 2, 3);
- $this->container->mockery_verify();
- }
-
- /**
- * @expectedException \Mockery\Exception
- */
- public function testFloatConstraintThrowsExceptionWhenConstraintUnmatched()
- {
- $this->mock->shouldReceive('foo')->with(Mockery::type('float'))->once();
- $this->mock->foo(1);
- $this->container->mockery_verify();
- }
-
- public function testIntConstraintMatchesArgument()
- {
- $this->mock->shouldReceive('foo')->with(Mockery::type('int'))->once();
- $this->mock->foo(2);
- $this->container->mockery_verify();
- }
-
- public function testIntConstraintNonMatchingCase()
- {
- $this->mock->shouldReceive('foo')->times(3);
- $this->mock->shouldReceive('foo')->with(1, Mockery::type('int'))->never();
- $this->mock->foo();
- $this->mock->foo(1);
- $this->mock->foo(1, 2, 3);
- $this->container->mockery_verify();
- }
-
- /**
- * @expectedException \Mockery\Exception
- */
- public function testIntConstraintThrowsExceptionWhenConstraintUnmatched()
- {
- $this->mock->shouldReceive('foo')->with(Mockery::type('int'))->once();
- $this->mock->foo('f');
- $this->container->mockery_verify();
- }
-
- public function testLongConstraintMatchesArgument()
- {
- $this->mock->shouldReceive('foo')->with(Mockery::type('long'))->once();
- $this->mock->foo(2);
- $this->container->mockery_verify();
- }
-
- public function testLongConstraintNonMatchingCase()
- {
- $this->mock->shouldReceive('foo')->times(3);
- $this->mock->shouldReceive('foo')->with(1, Mockery::type('long'))->never();
- $this->mock->foo();
- $this->mock->foo(1);
- $this->mock->foo(1, 2, 3);
- $this->container->mockery_verify();
- }
-
- /**
- * @expectedException \Mockery\Exception
- */
- public function testLongConstraintThrowsExceptionWhenConstraintUnmatched()
- {
- $this->mock->shouldReceive('foo')->with(Mockery::type('long'))->once();
- $this->mock->foo('f');
- $this->container->mockery_verify();
- }
-
- public function testNullConstraintMatchesArgument()
- {
- $this->mock->shouldReceive('foo')->with(Mockery::type('null'))->once();
- $this->mock->foo(null);
- $this->container->mockery_verify();
- }
-
- public function testNullConstraintNonMatchingCase()
- {
- $this->mock->shouldReceive('foo')->times(3);
- $this->mock->shouldReceive('foo')->with(1, Mockery::type('null'))->never();
- $this->mock->foo();
- $this->mock->foo(1);
- $this->mock->foo(1, 2, 3);
- $this->container->mockery_verify();
- }
-
- /**
- * @expectedException \Mockery\Exception
- */
- public function testNullConstraintThrowsExceptionWhenConstraintUnmatched()
- {
- $this->mock->shouldReceive('foo')->with(Mockery::type('null'))->once();
- $this->mock->foo('f');
- $this->container->mockery_verify();
- }
-
- public function testNumericConstraintMatchesArgument()
- {
- $this->mock->shouldReceive('foo')->with(Mockery::type('numeric'))->once();
- $this->mock->foo('2');
- $this->container->mockery_verify();
- }
-
- public function testNumericConstraintNonMatchingCase()
- {
- $this->mock->shouldReceive('foo')->times(3);
- $this->mock->shouldReceive('foo')->with(1, Mockery::type('numeric'))->never();
- $this->mock->foo();
- $this->mock->foo(1);
- $this->mock->foo(1, 2, 3);
- $this->container->mockery_verify();
- }
-
- /**
- * @expectedException \Mockery\Exception
- */
- public function testNumericConstraintThrowsExceptionWhenConstraintUnmatched()
- {
- $this->mock->shouldReceive('foo')->with(Mockery::type('numeric'))->once();
- $this->mock->foo('f');
- $this->container->mockery_verify();
- }
-
- public function testObjectConstraintMatchesArgument()
- {
- $this->mock->shouldReceive('foo')->with(Mockery::type('object'))->once();
- $this->mock->foo(new stdClass);
- $this->container->mockery_verify();
- }
-
- public function testObjectConstraintNonMatchingCase()
- {
- $this->mock->shouldReceive('foo')->times(3);
- $this->mock->shouldReceive('foo')->with(1, Mockery::type('object`'))->never();
- $this->mock->foo();
- $this->mock->foo(1);
- $this->mock->foo(1, 2, 3);
- $this->container->mockery_verify();
- }
-
- /**
- * @expectedException \Mockery\Exception
- */
- public function testObjectConstraintThrowsExceptionWhenConstraintUnmatched()
- {
- $this->mock->shouldReceive('foo')->with(Mockery::type('object'))->once();
- $this->mock->foo('f');
- $this->container->mockery_verify();
- }
-
- public function testRealConstraintMatchesArgument()
- {
- $this->mock->shouldReceive('foo')->with(Mockery::type('real'))->once();
- $this->mock->foo(2.25);
- $this->container->mockery_verify();
- }
-
- public function testRealConstraintNonMatchingCase()
- {
- $this->mock->shouldReceive('foo')->times(3);
- $this->mock->shouldReceive('foo')->with(1, Mockery::type('real'))->never();
- $this->mock->foo();
- $this->mock->foo(1);
- $this->mock->foo(1, 2, 3);
- $this->container->mockery_verify();
- }
-
- /**
- * @expectedException \Mockery\Exception
- */
- public function testRealConstraintThrowsExceptionWhenConstraintUnmatched()
- {
- $this->mock->shouldReceive('foo')->with(Mockery::type('real'))->once();
- $this->mock->foo('f');
- $this->container->mockery_verify();
- }
-
- public function testResourceConstraintMatchesArgument()
- {
- $this->mock->shouldReceive('foo')->with(Mockery::type('resource'))->once();
- $r = fopen(dirname(__FILE__) . '/_files/file.txt', 'r');
- $this->mock->foo($r);
- $this->container->mockery_verify();
- }
-
- public function testResourceConstraintNonMatchingCase()
- {
- $this->mock->shouldReceive('foo')->times(3);
- $this->mock->shouldReceive('foo')->with(1, Mockery::type('resource'))->never();
- $this->mock->foo();
- $this->mock->foo(1);
- $this->mock->foo(1, 2, 3);
- $this->container->mockery_verify();
- }
-
- /**
- * @expectedException \Mockery\Exception
- */
- public function testResourceConstraintThrowsExceptionWhenConstraintUnmatched()
- {
- $this->mock->shouldReceive('foo')->with(Mockery::type('resource'))->once();
- $this->mock->foo('f');
- $this->container->mockery_verify();
- }
-
- public function testScalarConstraintMatchesArgument()
- {
- $this->mock->shouldReceive('foo')->with(Mockery::type('scalar'))->once();
- $this->mock->foo(2);
- $this->container->mockery_verify();
- }
-
- public function testScalarConstraintNonMatchingCase()
- {
- $this->mock->shouldReceive('foo')->times(3);
- $this->mock->shouldReceive('foo')->with(1, Mockery::type('scalar'))->never();
- $this->mock->foo();
- $this->mock->foo(1);
- $this->mock->foo(1, 2, 3);
- $this->container->mockery_verify();
- }
-
- /**
- * @expectedException \Mockery\Exception
- */
- public function testScalarConstraintThrowsExceptionWhenConstraintUnmatched()
- {
- $this->mock->shouldReceive('foo')->with(Mockery::type('scalar'))->once();
- $this->mock->foo(array());
- $this->container->mockery_verify();
- }
-
- public function testStringConstraintMatchesArgument()
- {
- $this->mock->shouldReceive('foo')->with(Mockery::type('string'))->once();
- $this->mock->foo('2');
- $this->container->mockery_verify();
- }
-
- public function testStringConstraintNonMatchingCase()
- {
- $this->mock->shouldReceive('foo')->times(3);
- $this->mock->shouldReceive('foo')->with(1, Mockery::type('string'))->never();
- $this->mock->foo();
- $this->mock->foo(1);
- $this->mock->foo(1, 2, 3);
- $this->container->mockery_verify();
- }
-
- /**
- * @expectedException \Mockery\Exception
- */
- public function testStringConstraintThrowsExceptionWhenConstraintUnmatched()
- {
- $this->mock->shouldReceive('foo')->with(Mockery::type('string'))->once();
- $this->mock->foo(1);
- $this->container->mockery_verify();
- }
-
- public function testClassConstraintMatchesArgument()
- {
- $this->mock->shouldReceive('foo')->with(Mockery::type('stdClass'))->once();
- $this->mock->foo(new stdClass);
- $this->container->mockery_verify();
- }
-
- public function testClassConstraintNonMatchingCase()
- {
- $this->mock->shouldReceive('foo')->times(3);
- $this->mock->shouldReceive('foo')->with(1, Mockery::type('stdClass'))->never();
- $this->mock->foo();
- $this->mock->foo(1);
- $this->mock->foo(1, 2, 3);
- $this->container->mockery_verify();
- }
-
- /**
- * @expectedException \Mockery\Exception
- */
- public function testClassConstraintThrowsExceptionWhenConstraintUnmatched()
- {
- $this->mock->shouldReceive('foo')->with(Mockery::type('stdClass'))->once();
- $this->mock->foo(new Exception);
- $this->container->mockery_verify();
- }
-
- public function testDucktypeConstraintMatchesArgument()
- {
- $this->mock->shouldReceive('foo')->with(Mockery::ducktype('quack', 'swim'))->once();
- $this->mock->foo(new Mockery_Duck);
- $this->container->mockery_verify();
- }
-
- public function testDucktypeConstraintNonMatchingCase()
- {
- $this->mock->shouldReceive('foo')->times(3);
- $this->mock->shouldReceive('foo')->with(1, Mockery::ducktype('quack', 'swim'))->never();
- $this->mock->foo();
- $this->mock->foo(1);
- $this->mock->foo(1, 2, 3);
- $this->container->mockery_verify();
- }
-
- /**
- * @expectedException \Mockery\Exception
- */
- public function testDucktypeConstraintThrowsExceptionWhenConstraintUnmatched()
- {
- $this->mock->shouldReceive('foo')->with(Mockery::ducktype('quack', 'swim'))->once();
- $this->mock->foo(new Mockery_Duck_Nonswimmer);
- $this->container->mockery_verify();
- }
-
- public function testArrayContentConstraintMatchesArgument()
- {
- $this->mock->shouldReceive('foo')->with(Mockery::subset(array('a'=>1, 'b'=>2)))->once();
- $this->mock->foo(array('a'=>1, 'b'=>2, 'c'=>3));
- $this->container->mockery_verify();
- }
-
- public function testArrayContentConstraintNonMatchingCase()
- {
- $this->mock->shouldReceive('foo')->times(3);
- $this->mock->shouldReceive('foo')->with(1, Mockery::subset(array('a'=>1, 'b'=>2)))->never();
- $this->mock->foo();
- $this->mock->foo(1);
- $this->mock->foo(1, 2, 3);
- $this->container->mockery_verify();
- }
-
- /**
- * @expectedException \Mockery\Exception
- */
- public function testArrayContentConstraintThrowsExceptionWhenConstraintUnmatched()
- {
- $this->mock->shouldReceive('foo')->with(Mockery::subset(array('a'=>1, 'b'=>2)))->once();
- $this->mock->foo(array('a'=>1, 'c'=>3));
- $this->container->mockery_verify();
- }
-
- public function testContainsConstraintMatchesArgument()
- {
- $this->mock->shouldReceive('foo')->with(Mockery::contains(1, 2))->once();
- $this->mock->foo(array('a'=>1, 'b'=>2, 'c'=>3));
- $this->container->mockery_verify();
- }
-
- public function testContainsConstraintNonMatchingCase()
- {
- $this->mock->shouldReceive('foo')->times(3);
- $this->mock->shouldReceive('foo')->with(1, Mockery::contains(1, 2))->never();
- $this->mock->foo();
- $this->mock->foo(1);
- $this->mock->foo(1, 2, 3);
- $this->container->mockery_verify();
- }
-
- /**
- * @expectedException \Mockery\Exception
- */
- public function testContainsConstraintThrowsExceptionWhenConstraintUnmatched()
- {
- $this->mock->shouldReceive('foo')->with(Mockery::contains(1, 2))->once();
- $this->mock->foo(array('a'=>1, 'c'=>3));
- $this->container->mockery_verify();
- }
-
- public function testHasKeyConstraintMatchesArgument()
- {
- $this->mock->shouldReceive('foo')->with(Mockery::hasKey('c'))->once();
- $this->mock->foo(array('a'=>1, 'b'=>2, 'c'=>3));
- $this->container->mockery_verify();
- }
-
- public function testHasKeyConstraintNonMatchingCase()
- {
- $this->mock->shouldReceive('foo')->times(3);
- $this->mock->shouldReceive('foo')->with(1, Mockery::hasKey('a'))->never();
- $this->mock->foo();
- $this->mock->foo(1);
- $this->mock->foo(1, array('a'=>1), 3);
- $this->container->mockery_verify();
- }
-
- /**
- * @expectedException \Mockery\Exception
- */
- public function testHasKeyConstraintThrowsExceptionWhenConstraintUnmatched()
- {
- $this->mock->shouldReceive('foo')->with(Mockery::hasKey('c'))->once();
- $this->mock->foo(array('a'=>1, 'b'=>3));
- $this->container->mockery_verify();
- }
-
- public function testHasValueConstraintMatchesArgument()
- {
- $this->mock->shouldReceive('foo')->with(Mockery::hasValue(1))->once();
- $this->mock->foo(array('a'=>1, 'b'=>2, 'c'=>3));
- $this->container->mockery_verify();
- }
-
- public function testHasValueConstraintNonMatchingCase()
- {
- $this->mock->shouldReceive('foo')->times(3);
- $this->mock->shouldReceive('foo')->with(1, Mockery::hasValue(1))->never();
- $this->mock->foo();
- $this->mock->foo(1);
- $this->mock->foo(1, array('a'=>1), 3);
- $this->container->mockery_verify();
- }
-
- /**
- * @expectedException \Mockery\Exception
- */
- public function testHasValueConstraintThrowsExceptionWhenConstraintUnmatched()
- {
- $this->mock->shouldReceive('foo')->with(Mockery::hasValue(2))->once();
- $this->mock->foo(array('a'=>1, 'b'=>3));
- $this->container->mockery_verify();
- }
-
- public function testOnConstraintMatchesArgument_ClosureEvaluatesToTrue()
- {
- $function = function ($arg) {return $arg % 2 == 0;};
- $this->mock->shouldReceive('foo')->with(Mockery::on($function))->once();
- $this->mock->foo(4);
- $this->container->mockery_verify();
- }
-
- /**
- * @expectedException \Mockery\Exception
- */
- public function testOnConstraintThrowsExceptionWhenConstraintUnmatched_ClosureEvaluatesToFalse()
- {
- $function = function ($arg) {return $arg % 2 == 0;};
- $this->mock->shouldReceive('foo')->with(Mockery::on($function))->once();
- $this->mock->foo(5);
- $this->container->mockery_verify();
- }
-
- public function testMustBeConstraintMatchesArgument()
- {
- $this->mock->shouldReceive('foo')->with(Mockery::mustBe(2))->once();
- $this->mock->foo(2);
- $this->container->mockery_verify();
- }
-
- public function testMustBeConstraintNonMatchingCase()
- {
- $this->mock->shouldReceive('foo')->times(3);
- $this->mock->shouldReceive('foo')->with(1, Mockery::mustBe(2))->never();
- $this->mock->foo();
- $this->mock->foo(1);
- $this->mock->foo(1, 2, 3);
- $this->container->mockery_verify();
- }
-
- /**
- * @expectedException \Mockery\Exception
- */
- public function testMustBeConstraintThrowsExceptionWhenConstraintUnmatched()
- {
- $this->mock->shouldReceive('foo')->with(Mockery::mustBe(2))->once();
- $this->mock->foo('2');
- $this->container->mockery_verify();
- }
-
- public function testMustBeConstraintMatchesObjectArgumentWithEqualsComparisonNotIdentical()
- {
- $a = new stdClass;
- $a->foo = 1;
- $b = new stdClass;
- $b->foo = 1;
- $this->mock->shouldReceive('foo')->with(Mockery::mustBe($a))->once();
- $this->mock->foo($b);
- $this->container->mockery_verify();
- }
-
- public function testMustBeConstraintNonMatchingCaseWithObject()
- {
- $a = new stdClass;
- $a->foo = 1;
- $this->mock->shouldReceive('foo')->times(3);
- $this->mock->shouldReceive('foo')->with(1, Mockery::mustBe($a))->never();
- $this->mock->foo();
- $this->mock->foo(1);
- $this->mock->foo(1, $a, 3);
- $this->container->mockery_verify();
- }
-
- /**
- * @expectedException \Mockery\Exception
- */
- public function testMustBeConstraintThrowsExceptionWhenConstraintUnmatchedWithObject()
- {
- $a = new stdClass;
- $a->foo = 1;
- $b = new stdClass;
- $b->foo = 2;
- $this->mock->shouldReceive('foo')->with(Mockery::mustBe($a))->once();
- $this->mock->foo($b);
- $this->container->mockery_verify();
- }
-
- public function testMatchPrecedenceBasedOnExpectedCallsFavouringExplicitMatch()
- {
- $this->mock->shouldReceive('foo')->with(1)->once();
- $this->mock->shouldReceive('foo')->with(Mockery::any())->never();
- $this->mock->foo(1);
- $this->container->mockery_verify();
- }
-
- public function testMatchPrecedenceBasedOnExpectedCallsFavouringAnyMatch()
- {
- $this->mock->shouldReceive('foo')->with(Mockery::any())->once();
- $this->mock->shouldReceive('foo')->with(1)->never();
- $this->mock->foo(1);
- $this->container->mockery_verify();
- }
-
- public function testReturnNullIfIgnoreMissingMethodsSet()
- {
- $this->mock->shouldIgnoreMissing();
- $this->assertNull($this->mock->g(1, 2));
- }
-
- public function testReturnUndefinedIfIgnoreMissingMethodsSet()
- {
- $this->mock->shouldIgnoreMissing()->asUndefined();
- $this->assertTrue($this->mock->g(1, 2) instanceof \Mockery\Undefined);
- }
-
- public function testReturnAsUndefinedAllowsForInfiniteSelfReturningChain()
- {
- $this->mock->shouldIgnoreMissing()->asUndefined();
- $this->assertTrue($this->mock->g(1, 2)->a()->b()->c() instanceof \Mockery\Undefined);
- }
-
- public function testShouldIgnoreMissingFluentInterface()
- {
- $this->assertTrue($this->mock->shouldIgnoreMissing() instanceof \Mockery\MockInterface);
- }
-
- public function testShouldIgnoreMissingAsUndefinedFluentInterface()
- {
- $this->assertTrue($this->mock->shouldIgnoreMissing()->asUndefined() instanceof \Mockery\MockInterface);
- }
-
- public function testShouldIgnoreMissingAsDefinedProxiesToUndefinedAllowingToString()
- {
- $this->mock->shouldIgnoreMissing()->asUndefined();
- $string = "Method call: {$this->mock->g()}";
- $string = "Mock: {$this->mock}";
- }
-
- public function testShouldIgnoreMissingDefaultReturnValue()
- {
- $this->mock->shouldIgnoreMissing(1);
- $this->assertEquals(1, $this->mock->a());
- }
-
- /** @issue #253 */
- public function testShouldIgnoreMissingDefaultSelfAndReturnsSelf()
- {
- $this->mock->shouldIgnoreMissing($this->container->self());
- $this->assertSame($this->mock, $this->mock->a()->b());
- }
-
- public function testToStringMagicMethodCanBeMocked()
- {
- $this->mock->shouldReceive("__toString")->andReturn('dave');
- $this->assertEquals("{$this->mock}", "dave");
- }
-
- public function testOptionalMockRetrieval()
- {
- $m = $this->container->mock('f')->shouldReceive('foo')->with(1)->andReturn(3)->mock();
- $this->assertTrue($m instanceof \Mockery\MockInterface);
- }
-
- public function testNotConstraintMatchesArgument()
- {
- $this->mock->shouldReceive('foo')->with(Mockery::not(1))->once();
- $this->mock->foo(2);
- $this->container->mockery_verify();
- }
-
- public function testNotConstraintNonMatchingCase()
- {
- $this->mock->shouldReceive('foo')->times(3);
- $this->mock->shouldReceive('foo')->with(1, Mockery::not(2))->never();
- $this->mock->foo();
- $this->mock->foo(1);
- $this->mock->foo(1, 2, 3);
- $this->container->mockery_verify();
- }
-
- /**
- * @expectedException \Mockery\Exception
- */
- public function testNotConstraintThrowsExceptionWhenConstraintUnmatched()
- {
- $this->mock->shouldReceive('foo')->with(Mockery::not(2))->once();
- $this->mock->foo(2);
- $this->container->mockery_verify();
- }
-
- public function testAnyOfConstraintMatchesArgument()
- {
- $this->mock->shouldReceive('foo')->with(Mockery::anyOf(1, 2))->twice();
- $this->mock->foo(2);
- $this->mock->foo(1);
- $this->container->mockery_verify();
- }
-
- public function testAnyOfConstraintNonMatchingCase()
- {
- $this->mock->shouldReceive('foo')->times(3);
- $this->mock->shouldReceive('foo')->with(1, Mockery::anyOf(1, 2))->never();
- $this->mock->foo();
- $this->mock->foo(1);
- $this->mock->foo(1, 2, 3);
- $this->container->mockery_verify();
- }
-
- /**
- * @expectedException \Mockery\Exception
- */
- public function testAnyOfConstraintThrowsExceptionWhenConstraintUnmatched()
- {
- $this->mock->shouldReceive('foo')->with(Mockery::anyOf(1, 2))->once();
- $this->mock->foo(3);
- $this->container->mockery_verify();
- }
-
- public function testNotAnyOfConstraintMatchesArgument()
- {
- $this->mock->shouldReceive('foo')->with(Mockery::notAnyOf(1, 2))->once();
- $this->mock->foo(3);
- $this->container->mockery_verify();
- }
-
- public function testNotAnyOfConstraintNonMatchingCase()
- {
- $this->mock->shouldReceive('foo')->times(3);
- $this->mock->shouldReceive('foo')->with(1, Mockery::notAnyOf(1, 2))->never();
- $this->mock->foo();
- $this->mock->foo(1);
- $this->mock->foo(1, 4, 3);
- $this->container->mockery_verify();
- }
-
- /**
- * @expectedException \Mockery\Exception
- */
- public function testNotAnyOfConstraintThrowsExceptionWhenConstraintUnmatched()
- {
- $this->mock->shouldReceive('foo')->with(Mockery::notAnyOf(1, 2))->once();
- $this->mock->foo(2);
- $this->container->mockery_verify();
- }
-
- /**
- * @expectedException \Mockery\Exception
- */
- public function testGlobalConfigMayForbidMockingNonExistentMethodsOnClasses()
- {
- \Mockery::getConfiguration()->allowMockingNonExistentMethods(false);
- $mock = $this->container->mock('stdClass');
- $mock->shouldReceive('foo');
- }
-
- /**
- * @expectedException \Mockery\Exception
- * @expectedExceptionMessage Mockery's configuration currently forbids mocking
- */
- public function testGlobalConfigMayForbidMockingNonExistentMethodsOnAutoDeclaredClasses()
- {
- \Mockery::getConfiguration()->allowMockingNonExistentMethods(false);
- $mock = $this->container->mock('SomeMadeUpClass');
- $mock->shouldReceive('foo');
- }
-
- /**
- * @expectedException \Mockery\Exception
- */
- public function testGlobalConfigMayForbidMockingNonExistentMethodsOnObjects()
- {
- \Mockery::getConfiguration()->allowMockingNonExistentMethods(false);
- $mock = $this->container->mock(new stdClass);
- $mock->shouldReceive('foo');
- }
-
- public function testAnExampleWithSomeExpectationAmends()
- {
- $service = $this->container->mock('MyService');
- $service->shouldReceive('login')->with('user', 'pass')->once()->andReturn(true);
- $service->shouldReceive('hasBookmarksTagged')->with('php')->once()->andReturn(false);
- $service->shouldReceive('addBookmark')->with('/^http:/', \Mockery::type('string'))->times(3)->andReturn(true);
- $service->shouldReceive('hasBookmarksTagged')->with('php')->once()->andReturn(true);
-
- $this->assertTrue($service->login('user', 'pass'));
- $this->assertFalse($service->hasBookmarksTagged('php'));
- $this->assertTrue($service->addBookmark('http://example.com/1', 'some_tag1'));
- $this->assertTrue($service->addBookmark('http://example.com/2', 'some_tag2'));
- $this->assertTrue($service->addBookmark('http://example.com/3', 'some_tag3'));
- $this->assertTrue($service->hasBookmarksTagged('php'));
-
- $this->container->mockery_verify();
- }
-
- public function testAnExampleWithSomeExpectationAmendsOnCallCounts()
- {
- $service = $this->container->mock('MyService');
- $service->shouldReceive('login')->with('user', 'pass')->once()->andReturn(true);
- $service->shouldReceive('hasBookmarksTagged')->with('php')->once()->andReturn(false);
- $service->shouldReceive('addBookmark')->with('/^http:/', \Mockery::type('string'))->times(3)->andReturn(true);
- $service->shouldReceive('hasBookmarksTagged')->with('php')->twice()->andReturn(true);
-
- $this->assertTrue($service->login('user', 'pass'));
- $this->assertFalse($service->hasBookmarksTagged('php'));
- $this->assertTrue($service->addBookmark('http://example.com/1', 'some_tag1'));
- $this->assertTrue($service->addBookmark('http://example.com/2', 'some_tag2'));
- $this->assertTrue($service->addBookmark('http://example.com/3', 'some_tag3'));
- $this->assertTrue($service->hasBookmarksTagged('php'));
- $this->assertTrue($service->hasBookmarksTagged('php'));
-
- $this->container->mockery_verify();
- }
-
- public function testAnExampleWithSomeExpectationAmendsOnCallCounts_PHPUnitTest()
- {
- $service = $this->getMock('MyService2');
- $service->expects($this->once())->method('login')->with('user', 'pass')->will($this->returnValue(true));
- $service->expects($this->exactly(3))->method('hasBookmarksTagged')->with('php')
- ->will($this->onConsecutiveCalls(false, true, true));
- $service->expects($this->exactly(3))->method('addBookmark')
- ->with($this->matchesRegularExpression('/^http:/'), $this->isType('string'))
- ->will($this->returnValue(true));
-
- $this->assertTrue($service->login('user', 'pass'));
- $this->assertFalse($service->hasBookmarksTagged('php'));
- $this->assertTrue($service->addBookmark('http://example.com/1', 'some_tag1'));
- $this->assertTrue($service->addBookmark('http://example.com/2', 'some_tag2'));
- $this->assertTrue($service->addBookmark('http://example.com/3', 'some_tag3'));
- $this->assertTrue($service->hasBookmarksTagged('php'));
- $this->assertTrue($service->hasBookmarksTagged('php'));
- }
-
- public function testMockedMethodsCallableFromWithinOriginalClass()
- {
- $mock = $this->container->mock('MockeryTest_InterMethod1[doThird]');
- $mock->shouldReceive('doThird')->andReturn(true);
- $this->assertTrue($mock->doFirst());
- }
-
- /**
- * @group issue #20
- */
- public function testMockingDemeterChainsPassesMockeryExpectationToCompositeExpectation()
- {
- $mock = $this->container->mock('Mockery_Demeterowski');
- $mock->shouldReceive('foo->bar->baz')->andReturn('Spam!');
- $demeter = new Mockery_UseDemeter($mock);
- $this->assertSame('Spam!', $demeter->doit());
- }
-
- /**
- * @group issue #20 - with args in demeter chain
- */
- public function testMockingDemeterChainsPassesMockeryExpectationToCompositeExpectationWithArgs()
- {
- $mock = $this->container->mock('Mockery_Demeterowski');
- $mock->shouldReceive('foo->bar->baz')->andReturn('Spam!');
- $demeter = new Mockery_UseDemeter($mock);
- $this->assertSame('Spam!', $demeter->doitWithArgs());
- }
-
- public function testPassthruEnsuresRealMethodCalledForReturnValues()
- {
- $mock = $this->container->mock('MockeryTest_SubjectCall1');
- $mock->shouldReceive('foo')->once()->passthru();
- $this->assertEquals('bar', $mock->foo());
- $this->container->mockery_verify();
- }
-
- public function testShouldIgnoreMissingExpectationBasedOnArgs()
- {
- $mock = $this->container->mock("MyService2")->shouldIgnoreMissing();
- $mock->shouldReceive("hasBookmarksTagged")->with("dave")->once();
- $mock->hasBookmarksTagged("dave");
- $mock->hasBookmarksTagged("padraic");
- $this->container->mockery_verify();
- }
-
- public function testShouldDeferMissingExpectationBasedOnArgs()
- {
- $mock = $this->container->mock("MockeryTest_SubjectCall1")->shouldDeferMissing();
-
- $this->assertEquals('bar', $mock->foo());
- $this->assertEquals('bar', $mock->foo("baz"));
- $this->assertEquals('bar', $mock->foo("qux"));
-
- $mock->shouldReceive("foo")->with("baz")->twice()->andReturn('123');
- $this->assertEquals('bar', $mock->foo());
- $this->assertEquals('123', $mock->foo("baz"));
- $this->assertEquals('bar', $mock->foo("qux"));
-
- $mock->shouldReceive("foo")->withNoArgs()->once()->andReturn('456');
- $this->assertEquals('456', $mock->foo());
- $this->assertEquals('123', $mock->foo("baz"));
- $this->assertEquals('bar', $mock->foo("qux"));
-
- $this->container->mockery_verify();
- }
-
- public function testCanReturnSelf()
- {
- $this->mock->shouldReceive("foo")->andReturnSelf();
- $this->assertSame($this->mock, $this->mock->foo());
- }
-
- public function testExpectationCanBeOverridden()
- {
- $this->mock->shouldReceive('foo')->once()->andReturn('green');
- $this->mock->shouldReceive('foo')->andReturn('blue');
- $this->assertEquals($this->mock->foo(), 'green');
- $this->assertEquals($this->mock->foo(), 'blue');
- }
-}
-
-class MockeryTest_SubjectCall1
-{
- public function foo()
- {
- return 'bar';
- }
-}
-
-class MockeryTest_InterMethod1
-{
- public function doFirst()
- {
- return $this->doSecond();
- }
-
- private function doSecond()
- {
- return $this->doThird();
- }
-
- public function doThird()
- {
- return false;
- }
-}
-
-class MyService2
-{
- public function login($user, $pass)
- {
- }
- public function hasBookmarksTagged($tag)
- {
- }
- public function addBookmark($uri, $tag)
- {
- }
-}
-
-class Mockery_Duck
-{
- public function quack()
- {
- }
- public function swim()
- {
- }
-}
-
-class Mockery_Duck_Nonswimmer
-{
- public function quack()
- {
- }
-}
-
-class Mockery_Demeterowski
-{
- public function foo()
- {
- return $this;
- }
- public function bar()
- {
- return $this;
- }
- public function baz()
- {
- return 'Ham!';
- }
-}
-
-class Mockery_UseDemeter
-{
- public function __construct($demeter)
- {
- $this->demeter = $demeter;
- }
- public function doit()
- {
- return $this->demeter->foo()->bar()->baz();
- }
- public function doitWithArgs()
- {
- return $this->demeter->foo("foo")->bar("bar")->baz("baz");
- }
-}
-
-class MockeryTest_Foo
-{
- public function foo()
- {
- }
-}
diff --git a/vendor/mockery/mockery/tests/Mockery/Fixtures/MethodWithNullableParameters.php b/vendor/mockery/mockery/tests/Mockery/Fixtures/MethodWithNullableParameters.php
deleted file mode 100644
index 17700e7e6ab..00000000000
--- a/vendor/mockery/mockery/tests/Mockery/Fixtures/MethodWithNullableParameters.php
+++ /dev/null
@@ -1,49 +0,0 @@
-assertTrue($target->hasInternalAncestor());
-
- $target = new DefinedTargetClass(new \ReflectionClass("Mockery\MockeryTest_ClassThatExtendsArrayObject"));
- $this->assertTrue($target->hasInternalAncestor());
-
- $target = new DefinedTargetClass(new \ReflectionClass("Mockery\DefinedTargetClassTest"));
- $this->assertFalse($target->hasInternalAncestor());
- }
-}
-
-class MockeryTest_ClassThatExtendsArrayObject extends \ArrayObject
-{
-}
diff --git a/vendor/mockery/mockery/tests/Mockery/Generator/MockConfigurationTest.php b/vendor/mockery/mockery/tests/Mockery/Generator/MockConfigurationTest.php
deleted file mode 100644
index 12aee9cad0d..00000000000
--- a/vendor/mockery/mockery/tests/Mockery/Generator/MockConfigurationTest.php
+++ /dev/null
@@ -1,197 +0,0 @@
-getMethodsToMock();
- $this->assertEquals(1, count($methods));
- $this->assertEquals("bar", $methods[0]->getName());
- }
-
- /**
- * @test
- */
- public function blackListsAreCaseInsensitive()
- {
- $config = new MockConfiguration(array("Mockery\Generator\\TestSubject"), array("FOO"));
-
- $methods = $config->getMethodsToMock();
- $this->assertEquals(1, count($methods));
- $this->assertEquals("bar", $methods[0]->getName());
- }
-
-
- /**
- * @test
- */
- public function onlyWhiteListedMethodsShouldBeInListToBeMocked()
- {
- $config = new MockConfiguration(array("Mockery\Generator\\TestSubject"), array(), array('foo'));
-
- $methods = $config->getMethodsToMock();
- $this->assertEquals(1, count($methods));
- $this->assertEquals("foo", $methods[0]->getName());
- }
-
- /**
- * @test
- */
- public function whitelistOverRulesBlackList()
- {
- $config = new MockConfiguration(array("Mockery\Generator\\TestSubject"), array("foo"), array("foo"));
-
- $methods = $config->getMethodsToMock();
- $this->assertEquals(1, count($methods));
- $this->assertEquals("foo", $methods[0]->getName());
- }
-
- /**
- * @test
- */
- public function whiteListsAreCaseInsensitive()
- {
- $config = new MockConfiguration(array("Mockery\Generator\\TestSubject"), array(), array("FOO"));
-
- $methods = $config->getMethodsToMock();
- $this->assertEquals(1, count($methods));
- $this->assertEquals("foo", $methods[0]->getName());
- }
-
- /**
- * @test
- */
- public function finalMethodsAreExcluded()
- {
- $config = new MockConfiguration(array("Mockery\Generator\\ClassWithFinalMethod"));
-
- $methods = $config->getMethodsToMock();
- $this->assertEquals(1, count($methods));
- $this->assertEquals("bar", $methods[0]->getName());
- }
-
- /**
- * @test
- */
- public function shouldIncludeMethodsFromAllTargets()
- {
- $config = new MockConfiguration(array("Mockery\\Generator\\TestInterface", "Mockery\\Generator\\TestInterface2"));
- $methods = $config->getMethodsToMock();
- $this->assertEquals(2, count($methods));
- }
-
- /**
- * @test
- * @expectedException Mockery\Exception
- */
- public function shouldThrowIfTargetClassIsFinal()
- {
- $config = new MockConfiguration(array("Mockery\\Generator\\TestFinal"));
- $config->getTargetClass();
- }
-
- /**
- * @test
- */
- public function shouldTargetIteratorAggregateIfTryingToMockTraversable()
- {
- $config = new MockConfiguration(array("\\Traversable"));
-
- $interfaces = $config->getTargetInterfaces();
- $this->assertEquals(1, count($interfaces));
- $first = array_shift($interfaces);
- $this->assertEquals("IteratorAggregate", $first->getName());
- }
-
- /**
- * @test
- */
- public function shouldTargetIteratorAggregateIfTraversableInTargetsTree()
- {
- $config = new MockConfiguration(array("Mockery\Generator\TestTraversableInterface"));
-
- $interfaces = $config->getTargetInterfaces();
- $this->assertEquals(2, count($interfaces));
- $this->assertEquals("IteratorAggregate", $interfaces[0]->getName());
- $this->assertEquals("Mockery\Generator\TestTraversableInterface", $interfaces[1]->getName());
- }
-
- /**
- * @test
- */
- public function shouldBringIteratorToHeadOfTargetListIfTraversablePresent()
- {
- $config = new MockConfiguration(array("Mockery\Generator\TestTraversableInterface2"));
-
- $interfaces = $config->getTargetInterfaces();
- $this->assertEquals(2, count($interfaces));
- $this->assertEquals("Iterator", $interfaces[0]->getName());
- $this->assertEquals("Mockery\Generator\TestTraversableInterface2", $interfaces[1]->getName());
- }
-
- /**
- * @test
- */
- public function shouldBringIteratorAggregateToHeadOfTargetListIfTraversablePresent()
- {
- $config = new MockConfiguration(array("Mockery\Generator\TestTraversableInterface3"));
-
- $interfaces = $config->getTargetInterfaces();
- $this->assertEquals(2, count($interfaces));
- $this->assertEquals("IteratorAggregate", $interfaces[0]->getName());
- $this->assertEquals("Mockery\Generator\TestTraversableInterface3", $interfaces[1]->getName());
- }
-}
-
-interface TestTraversableInterface extends \Traversable
-{
-}
-interface TestTraversableInterface2 extends \Traversable, \Iterator
-{
-}
-interface TestTraversableInterface3 extends \Traversable, \IteratorAggregate
-{
-}
-
-final class TestFinal
-{
-}
-
-interface TestInterface
-{
- public function foo();
-}
-
-interface TestInterface2
-{
- public function bar();
-}
-
-class TestSubject
-{
- public function foo()
- {
- }
-
- public function bar()
- {
- }
-}
-
-class ClassWithFinalMethod
-{
- final public function foo()
- {
- }
-
- public function bar()
- {
- }
-}
diff --git a/vendor/mockery/mockery/tests/Mockery/Generator/StringManipulation/Pass/CallTypeHintPassTest.php b/vendor/mockery/mockery/tests/Mockery/Generator/StringManipulation/Pass/CallTypeHintPassTest.php
deleted file mode 100644
index a8bb1551e3c..00000000000
--- a/vendor/mockery/mockery/tests/Mockery/Generator/StringManipulation/Pass/CallTypeHintPassTest.php
+++ /dev/null
@@ -1,39 +0,0 @@
- true,
- ))->shouldDeferMissing();
- $code = $pass->apply(static::CODE, $config);
- $this->assertContains('__call($method, $args)', $code);
- }
-
- /**
- * @test
- */
- public function shouldRemoveCallStaticTypeHintIfRequired()
- {
- $pass = new CallTypeHintPass;
- $config = m::mock("Mockery\Generator\MockConfiguration", array(
- "requiresCallStaticTypeHintRemoval" => true,
- ))->shouldDeferMissing();
- $code = $pass->apply(static::CODE, $config);
- $this->assertContains('__callStatic($method, $args)', $code);
- }
-}
diff --git a/vendor/mockery/mockery/tests/Mockery/Generator/StringManipulation/Pass/ClassNamePassTest.php b/vendor/mockery/mockery/tests/Mockery/Generator/StringManipulation/Pass/ClassNamePassTest.php
deleted file mode 100644
index e283cce1f1c..00000000000
--- a/vendor/mockery/mockery/tests/Mockery/Generator/StringManipulation/Pass/ClassNamePassTest.php
+++ /dev/null
@@ -1,58 +0,0 @@
-pass = new ClassNamePass();
- }
-
- /**
- * @test
- */
- public function shouldRemoveNamespaceDefinition()
- {
- $config = new MockConfiguration(array(), array(), array(), "Dave\Dave");
- $code = $this->pass->apply(static::CODE, $config);
- $this->assertNotContains('namespace Mockery;', $code);
- }
-
- /**
- * @test
- */
- public function shouldReplaceNamespaceIfClassNameIsNamespaced()
- {
- $config = new MockConfiguration(array(), array(), array(), "Dave\Dave");
- $code = $this->pass->apply(static::CODE, $config);
- $this->assertNotContains('namespace Mockery;', $code);
- $this->assertContains('namespace Dave;', $code);
- }
-
- /**
- * @test
- */
- public function shouldReplaceClassNameWithSpecifiedName()
- {
- $config = new MockConfiguration(array(), array(), array(), "Dave");
- $code = $this->pass->apply(static::CODE, $config);
- $this->assertContains('class Dave', $code);
- }
-
- /**
- * @test
- */
- public function shouldRemoveLeadingBackslashesFromNamespace()
- {
- $config = new MockConfiguration(array(), array(), array(), "\Dave\Dave");
- $code = $this->pass->apply(static::CODE, $config);
- $this->assertContains('namespace Dave;', $code);
- }
-}
diff --git a/vendor/mockery/mockery/tests/Mockery/Generator/StringManipulation/Pass/InstanceMockPassTest.php b/vendor/mockery/mockery/tests/Mockery/Generator/StringManipulation/Pass/InstanceMockPassTest.php
deleted file mode 100644
index 23493de807f..00000000000
--- a/vendor/mockery/mockery/tests/Mockery/Generator/StringManipulation/Pass/InstanceMockPassTest.php
+++ /dev/null
@@ -1,24 +0,0 @@
-setInstanceMock(true);
- $config = $builder->getMockConfiguration();
- $pass = new InstanceMockPass;
- $code = $pass->apply('class Dave { }', $config);
- $this->assertContains('public function __construct', $code);
- $this->assertContains('protected $_mockery_ignoreVerification', $code);
- }
-}
diff --git a/vendor/mockery/mockery/tests/Mockery/Generator/StringManipulation/Pass/InterfacePassTest.php b/vendor/mockery/mockery/tests/Mockery/Generator/StringManipulation/Pass/InterfacePassTest.php
deleted file mode 100644
index ff248ca4814..00000000000
--- a/vendor/mockery/mockery/tests/Mockery/Generator/StringManipulation/Pass/InterfacePassTest.php
+++ /dev/null
@@ -1,46 +0,0 @@
- array(),
- ));
-
- $code = $pass->apply(static::CODE, $config);
- $this->assertEquals(static::CODE, $code);
- }
-
- /**
- * @test
- */
- public function shouldAddAnyInterfaceNamesToImplementsDefinition()
- {
- $pass = new InterfacePass;
-
- $config = m::mock("Mockery\Generator\MockConfiguration", array(
- "getTargetInterfaces" => array(
- m::mock(array("getName" => "Dave\Dave")),
- m::mock(array("getName" => "Paddy\Paddy")),
- ),
- ));
-
- $code = $pass->apply(static::CODE, $config);
-
- $this->assertContains("implements MockInterface, \Dave\Dave, \Paddy\Paddy", $code);
- }
-}
diff --git a/vendor/mockery/mockery/tests/Mockery/HamcrestExpectationTest.php b/vendor/mockery/mockery/tests/Mockery/HamcrestExpectationTest.php
deleted file mode 100644
index 07f702e6964..00000000000
--- a/vendor/mockery/mockery/tests/Mockery/HamcrestExpectationTest.php
+++ /dev/null
@@ -1,65 +0,0 @@
-container = new \Mockery\Container(\Mockery::getDefaultGenerator(), \Mockery::getDefaultLoader());
- $this->mock = $this->container->mock('foo');
- }
-
-
- public function tearDown()
- {
- \Mockery::getConfiguration()->allowMockingNonExistentMethods(true);
- $this->container->mockery_close();
- }
-
- /** Just a quickie roundup of a few Hamcrest matchers to check nothing obvious out of place **/
-
- public function testAnythingConstraintMatchesArgument()
- {
- $this->mock->shouldReceive('foo')->with(anything())->once();
- $this->mock->foo(2);
- $this->container->mockery_verify();
- }
-
- public function testGreaterThanConstraintMatchesArgument()
- {
- $this->mock->shouldReceive('foo')->with(greaterThan(1))->once();
- $this->mock->foo(2);
- $this->container->mockery_verify();
- }
-
- /**
- * @expectedException Mockery\Exception
- */
- public function testGreaterThanConstraintNotMatchesArgument()
- {
- $this->mock->shouldReceive('foo')->with(greaterThan(1))->once();
- $this->mock->foo(1);
- $this->container->mockery_verify();
- }
-}
diff --git a/vendor/mockery/mockery/tests/Mockery/Loader/EvalLoaderTest.php b/vendor/mockery/mockery/tests/Mockery/Loader/EvalLoaderTest.php
deleted file mode 100644
index 6081df4a85a..00000000000
--- a/vendor/mockery/mockery/tests/Mockery/Loader/EvalLoaderTest.php
+++ /dev/null
@@ -1,16 +0,0 @@
-getLoader()->load($definition);
-
- $this->assertTrue(class_exists($className));
- }
-
- abstract public function getLoader();
-}
diff --git a/vendor/mockery/mockery/tests/Mockery/Loader/RequireLoaderTest.php b/vendor/mockery/mockery/tests/Mockery/Loader/RequireLoaderTest.php
deleted file mode 100644
index 1d32abb38f0..00000000000
--- a/vendor/mockery/mockery/tests/Mockery/Loader/RequireLoaderTest.php
+++ /dev/null
@@ -1,16 +0,0 @@
-register();
- $expected = array($loader, 'loadClass');
- $this->assertTrue(in_array($expected, spl_autoload_functions()));
- }
-
- public function tearDown()
- {
- spl_autoload_unregister('\Mockery\Loader::loadClass');
- $loader = new \Mockery\Loader;
- $loader->register();
- }
-}
diff --git a/vendor/mockery/mockery/tests/Mockery/MockClassWithFinalWakeupTest.php b/vendor/mockery/mockery/tests/Mockery/MockClassWithFinalWakeupTest.php
deleted file mode 100644
index c2cb278c51a..00000000000
--- a/vendor/mockery/mockery/tests/Mockery/MockClassWithFinalWakeupTest.php
+++ /dev/null
@@ -1,96 +0,0 @@
-
- * @license http://github.com/padraic/mockery/blob/master/LICENSE New BSD License
- */
-
-namespace test\Mockery;
-
-use Mockery\Adapter\Phpunit\MockeryTestCase;
-
-class MockClassWithFinalWakeupTest extends MockeryTestCase
-{
-
- protected function setUp()
- {
- $this->container = new \Mockery\Container;
- }
-
- protected function tearDown()
- {
- $this->container->mockery_close();
- }
-
- /**
- * @test
- *
- * Test that we are able to create partial mocks of classes that have
- * a __wakeup method marked as final. As long as __wakeup is not one of the
- * mocked methods.
- */
- public function testCreateMockForClassWithFinalWakeup()
- {
- $mock = $this->container->mock("test\Mockery\TestWithFinalWakeup");
- $this->assertInstanceOf("test\Mockery\TestWithFinalWakeup", $mock);
- $this->assertEquals('test\Mockery\TestWithFinalWakeup::__wakeup', $mock->__wakeup());
-
- $mock = $this->container->mock('test\Mockery\SubclassWithFinalWakeup');
- $this->assertInstanceOf('test\Mockery\SubclassWithFinalWakeup', $mock);
- $this->assertEquals('test\Mockery\TestWithFinalWakeup::__wakeup', $mock->__wakeup());
- }
-
- public function testCreateMockForClassWithNonFinalWakeup()
- {
- $mock = $this->container->mock('test\Mockery\TestWithNonFinalWakeup');
- $this->assertInstanceOf('test\Mockery\TestWithNonFinalWakeup', $mock);
-
- // Make sure __wakeup is overridden and doesn't return anything.
- $this->assertNull($mock->__wakeup());
- }
-}
-
-class TestWithFinalWakeup
-{
-
- public function foo()
- {
- return 'foo';
- }
-
- public function bar()
- {
- return 'bar';
- }
-
- final public function __wakeup()
- {
- return __METHOD__;
- }
-}
-
-class SubclassWithFinalWakeup extends TestWithFinalWakeup
-{
-}
-
-class TestWithNonFinalWakeup
-{
- public function __wakeup()
- {
- return __METHOD__;
- }
-}
diff --git a/vendor/mockery/mockery/tests/Mockery/MockClassWithUnknownTypeHintTest.php b/vendor/mockery/mockery/tests/Mockery/MockClassWithUnknownTypeHintTest.php
deleted file mode 100644
index b2a59f76228..00000000000
--- a/vendor/mockery/mockery/tests/Mockery/MockClassWithUnknownTypeHintTest.php
+++ /dev/null
@@ -1,45 +0,0 @@
-container = new \Mockery\Container;
- }
-
- protected function tearDown()
- {
- $this->container->mockery_close();
- }
-
- /** @test */
- public function itShouldSuccessfullyBuildTheMock()
- {
- $this->container->mock("test\Mockery\HasUnknownClassAsTypeHintOnMethod");
- }
-}
-
-class HasUnknownClassAsTypeHintOnMethod
-{
- public function foo(\UnknownTestClass\Bar $bar)
- {
- }
-}
diff --git a/vendor/mockery/mockery/tests/Mockery/MockTest.php b/vendor/mockery/mockery/tests/Mockery/MockTest.php
deleted file mode 100644
index b9932cb5511..00000000000
--- a/vendor/mockery/mockery/tests/Mockery/MockTest.php
+++ /dev/null
@@ -1,193 +0,0 @@
-container = new \Mockery\Container(\Mockery::getDefaultGenerator(), \Mockery::getDefaultLoader());
- }
-
- public function teardown()
- {
- $this->container->mockery_close();
- }
-
- public function testAnonymousMockWorksWithNotAllowingMockingOfNonExistentMethods()
- {
- \Mockery::getConfiguration()->allowMockingNonExistentMethods(false);
- $m = $this->container->mock();
- $m->shouldReceive("test123")->andReturn(true);
- assertThat($m->test123(), equalTo(true));
- \Mockery::getConfiguration()->allowMockingNonExistentMethods(true);
- }
-
- public function testMockWithNotAllowingMockingOfNonExistentMethodsCanBeGivenAdditionalMethodsToMockEvenIfTheyDontExistOnClass()
- {
- \Mockery::getConfiguration()->allowMockingNonExistentMethods(false);
- $m = $this->container->mock('ExampleClassForTestingNonExistentMethod');
- $m->shouldAllowMockingMethod('testSomeNonExistentMethod');
- $m->shouldReceive("testSomeNonExistentMethod")->andReturn(true);
- assertThat($m->testSomeNonExistentMethod(), equalTo(true));
- \Mockery::getConfiguration()->allowMockingNonExistentMethods(true);
- }
-
- public function testShouldAllowMockingMethodReturnsMockInstance()
- {
- $m = Mockery::mock('someClass');
- $this->assertInstanceOf('Mockery\MockInterface', $m->shouldAllowMockingMethod('testFunction'));
- }
-
- public function testShouldAllowMockingProtectedMethodReturnsMockInstance()
- {
- $m = Mockery::mock('someClass');
- $this->assertInstanceOf('Mockery\MockInterface', $m->shouldAllowMockingProtectedMethods('testFunction'));
- }
-
- public function testMockAddsToString()
- {
- $mock = $this->container->mock('ClassWithNoToString');
- assertThat(hasToString($mock));
- }
-
- public function testMockToStringMayBeDeferred()
- {
- $mock = $this->container->mock('ClassWithToString')->shouldDeferMissing();
- assertThat((string)$mock, equalTo("foo"));
- }
-
- public function testMockToStringShouldIgnoreMissingAlwaysReturnsString()
- {
- $mock = $this->container->mock('ClassWithNoToString')->shouldIgnoreMissing();
- assertThat(isNonEmptyString((string)$mock));
-
- $mock->asUndefined();
- assertThat(isNonEmptyString((string)$mock));
- }
-
- public function testShouldIgnoreMissing()
- {
- $mock = $this->container->mock('ClassWithNoToString')->shouldIgnoreMissing();
- assertThat(nullValue($mock->nonExistingMethod()));
- }
-
- public function testShouldIgnoreDebugInfo()
- {
- $mock = $this->container->mock('ClassWithDebugInfo');
-
- $mock->__debugInfo();
- }
-
- /**
- * @expectedException Mockery\Exception
- */
- public function testShouldIgnoreMissingDisallowMockingNonExistentMethodsUsingGlobalConfiguration()
- {
- Mockery::getConfiguration()->allowMockingNonExistentMethods(false);
- $mock = $this->container->mock('ClassWithMethods')->shouldIgnoreMissing();
- $mock->shouldReceive('nonExistentMethod');
- }
-
- /**
- * @expectedException BadMethodCallException
- */
- public function testShouldIgnoreMissingCallingNonExistentMethodsUsingGlobalConfiguration()
- {
- Mockery::getConfiguration()->allowMockingNonExistentMethods(false);
- $mock = $this->container->mock('ClassWithMethods')->shouldIgnoreMissing();
- $mock->nonExistentMethod();
- }
-
- public function testShouldIgnoreMissingCallingExistentMethods()
- {
- Mockery::getConfiguration()->allowMockingNonExistentMethods(false);
- $mock = $this->container->mock('ClassWithMethods')->shouldIgnoreMissing();
- assertThat(nullValue($mock->foo()));
- $mock->shouldReceive('bar')->passthru();
- assertThat($mock->bar(), equalTo('bar'));
- }
-
- public function testShouldIgnoreMissingCallingNonExistentMethods()
- {
- Mockery::getConfiguration()->allowMockingNonExistentMethods(true);
- $mock = $this->container->mock('ClassWithMethods')->shouldIgnoreMissing();
- assertThat(nullValue($mock->foo()));
- assertThat(nullValue($mock->bar()));
- assertThat(nullValue($mock->nonExistentMethod()));
-
- $mock->shouldReceive(array('foo' => 'new_foo', 'nonExistentMethod' => 'result'));
- $mock->shouldReceive('bar')->passthru();
- assertThat($mock->foo(), equalTo('new_foo'));
- assertThat($mock->bar(), equalTo('bar'));
- assertThat($mock->nonExistentMethod(), equalTo('result'));
- }
-
- public function testCanMockException()
- {
- $exception = Mockery::mock('Exception');
- $this->assertInstanceOf('Exception', $exception);
- }
-}
-
-
-class ExampleClassForTestingNonExistentMethod
-{
-}
-
-class ClassWithToString
-{
- public function __toString()
- {
- return 'foo';
- }
-}
-
-class ClassWithNoToString
-{
-}
-
-class ClassWithMethods
-{
- public function foo()
- {
- return 'foo';
- }
-
- public function bar()
- {
- return 'bar';
- }
-}
-
-class ClassWithDebugInfo
-{
- public function __debugInfo()
- {
- return array('test' => 'test');
- }
-}
diff --git a/vendor/mockery/mockery/tests/Mockery/MockeryCanMockMultipleInterfacesWhichOverlapTest.php b/vendor/mockery/mockery/tests/Mockery/MockeryCanMockMultipleInterfacesWhichOverlapTest.php
deleted file mode 100644
index ac09ed44908..00000000000
--- a/vendor/mockery/mockery/tests/Mockery/MockeryCanMockMultipleInterfacesWhichOverlapTest.php
+++ /dev/null
@@ -1,66 +0,0 @@
-mock('Mockery\Tests\Evenement_EventEmitter', 'Mockery\Tests\Chatroulette_ConnectionInterface');
- }
-}
-
-interface Evenement_EventEmitterInterface
-{
- public function on($name, $callback);
-}
-
-class Evenement_EventEmitter implements Evenement_EventEmitterInterface
-{
- public function on($name, $callback)
- {
- }
-}
-
-interface React_StreamInterface extends Evenement_EventEmitterInterface
-{
- public function close();
-}
-
-interface React_ReadableStreamInterface extends React_StreamInterface
-{
- public function pause();
-}
-
-interface React_WritableStreamInterface extends React_StreamInterface
-{
- public function write($data);
-}
-
-interface Chatroulette_ConnectionInterface extends React_ReadableStreamInterface, React_WritableStreamInterface
-{
-}
diff --git a/vendor/mockery/mockery/tests/Mockery/MockingMethodsWithNullableParametersTest.php b/vendor/mockery/mockery/tests/Mockery/MockingMethodsWithNullableParametersTest.php
deleted file mode 100644
index 1e0836405d3..00000000000
--- a/vendor/mockery/mockery/tests/Mockery/MockingMethodsWithNullableParametersTest.php
+++ /dev/null
@@ -1,185 +0,0 @@
-container = new \Mockery\Container;
- }
-
- protected function tearDown()
- {
- $this->container->mockery_close();
- }
-
- /**
- * @test
- */
- public function itShouldAllowNonNullableTypeToBeSet()
- {
- $mock = $this->container->mock('test\Mockery\Fixtures\MethodWithNullableParameters');
-
- $mock->shouldReceive('nonNullablePrimitive')->with('a string');
- $mock->nonNullablePrimitive('a string');
- }
-
- /**
- * @test
- * @expectedException \TypeError
- */
- public function itShouldNotAllowNonNullToBeNull()
- {
- $mock = $this->container->mock('test\Mockery\Fixtures\MethodWithNullableParameters');
-
- $mock->nonNullablePrimitive(null);
- }
-
- /**
- * @test
- */
- public function itShouldAllowPrimitiveNullableToBeNull()
- {
- $mock = $this->container->mock('test\Mockery\Fixtures\MethodWithNullableParameters');
-
- $mock->shouldReceive('nullablePrimitive')->with(null);
- $mock->nullablePrimitive(null);
- }
-
- /**
- * @test
- */
- public function itShouldAllowPrimitiveNullabeToBeSet()
- {
- $mock = $this->container->mock('test\Mockery\Fixtures\MethodWithNullableParameters');
-
- $mock->shouldReceive('nullablePrimitive')->with('a string');
- $mock->nullablePrimitive('a string');
- }
- /**
- * @test
- */
- public function itShouldAllowSelfToBeSet()
- {
- $obj = new \test\Mockery\Fixtures\MethodWithNullableParameters;
- $mock = $this->container->mock('test\Mockery\Fixtures\MethodWithNullableParameters');
-
- $mock->shouldReceive('nonNullableSelf')->with($obj);
- $mock->nonNullableSelf($obj);
- }
-
- /**
- * @test
- * @expectedException \TypeError
- */
- public function itShouldNotAllowSelfToBeNull()
- {
- $mock = $this->container->mock('test\Mockery\Fixtures\MethodWithNullableParameters');
-
- $mock->nonNullableSelf(null);
- }
-
- /**
- * @test
- */
- public function itShouldAllowNullalbeSelfToBeSet()
- {
- $obj = new \test\Mockery\Fixtures\MethodWithNullableParameters;
-
- $mock = $this->container->mock('test\Mockery\Fixtures\MethodWithNullableParameters');
-
- $mock->shouldReceive('nullableSelf')->with($obj);
- $mock->nullableSelf($obj);
- }
-
- /**
- * @test
- */
- public function itShouldAllowNullableSelfToBeNull()
- {
- $mock = $this->container->mock('test\Mockery\Fixtures\MethodWithNullableParameters');
-
- $mock->shouldReceive('nullableClass')->with(null);
- $mock->nullableClass(null);
- }
-
- /**
- * @test
- */
- public function itShouldAllowClassToBeSet()
- {
- $obj = new \test\Mockery\Fixtures\MethodWithNullableParameters;
- $mock = $this->container->mock('test\Mockery\Fixtures\MethodWithNullableParameters');
-
- $mock->shouldReceive('nonNullableClass')->with($obj);
- $mock->nonNullableClass($obj);
- }
-
- /**
- * @test
- * @expectedException \TypeError
- */
- public function itShouldNotAllowClassToBeNull()
- {
- $mock = $this->container->mock('test\Mockery\Fixtures\MethodWithNullableParameters');
-
- $mock->nonNullableClass(null);
- }
-
- /**
- * @test
- */
- public function itShouldAllowNullalbeClassToBeSet()
- {
- $obj = new \test\Mockery\Fixtures\MethodWithNullableParameters;
-
- $mock = $this->container->mock('test\Mockery\Fixtures\MethodWithNullableParameters');
-
- $mock->shouldReceive('nullableClass')->with($obj);
- $mock->nullableClass($obj);
- }
-
- /**
- * @test
- */
- public function itShouldAllowNullableClassToBeNull()
- {
- $mock = $this->container->mock('test\Mockery\Fixtures\MethodWithNullableParameters');
-
- $mock->shouldReceive('nullableClass')->with(null);
- $mock->nullableClass(null);
- }
-}
diff --git a/vendor/mockery/mockery/tests/Mockery/MockingNullableMethodsTest.php b/vendor/mockery/mockery/tests/Mockery/MockingNullableMethodsTest.php
deleted file mode 100644
index 26fbd3fd51b..00000000000
--- a/vendor/mockery/mockery/tests/Mockery/MockingNullableMethodsTest.php
+++ /dev/null
@@ -1,184 +0,0 @@
-container = new \Mockery\Container;
- }
-
- protected function tearDown()
- {
- $this->container->mockery_close();
- }
-
- /**
- * @test
- */
- public function itShouldAllowNonNullableTypeToBeSet()
- {
- $mock = $this->container->mock('test\Mockery\Fixtures\MethodWithNullableReturnType');
-
- $mock->shouldReceive('nonNullablePrimitive')->andReturn('a string');
- $mock->nonNullablePrimitive();
- }
-
- /**
- * @test
- * @expectedException \TypeError
- */
- public function itShouldNotAllowNonNullToBeNull()
- {
- $mock = $this->container->mock('test\Mockery\Fixtures\MethodWithNullableReturnType');
-
- $mock->shouldReceive('nonNullablePrimitive')->andReturn(null);
- $mock->nonNullablePrimitive();
- }
-
- /**
- * @test
- */
- public function itShouldAllowPrimitiveNullableToBeNull()
- {
- $mock = $this->container->mock('test\Mockery\Fixtures\MethodWithNullableReturnType');
-
- $mock->shouldReceive('nullablePrimitive')->andReturn(null);
- $mock->nullablePrimitive();
- }
-
- /**
- * @test
- */
- public function itShouldAllowPrimitiveNullabeToBeSet()
- {
- $mock = $this->container->mock('test\Mockery\Fixtures\MethodWithNullableReturnType');
-
- $mock->shouldReceive('nullablePrimitive')->andReturn('a string');
- $mock->nullablePrimitive();
- }
-
- /**
- * @test
- */
- public function itShouldAllowSelfToBeSet()
- {
- $mock = $this->container->mock('test\Mockery\Fixtures\MethodWithNullableReturnType');
-
- $mock->shouldReceive('nonNullableSelf')->andReturn(new MethodWithNullableReturnType());
- $mock->nonNullableSelf();
- }
-
- /**
- * @test
- * @expectedException \TypeError
- */
- public function itShouldNotAllowSelfToBeNull()
- {
- $mock = $this->container->mock('test\Mockery\Fixtures\MethodWithNullableReturnType');
-
- $mock->shouldReceive('nonNullableSelf')->andReturn(null);
- $mock->nonNullableSelf();
- }
-
- /**
- * @test
- */
- public function itShouldAllowNullableSelfToBeSet()
- {
- $mock = $this->container->mock('test\Mockery\Fixtures\MethodWithNullableReturnType');
-
- $mock->shouldReceive('nullableSelf')->andReturn(new MethodWithNullableReturnType());
- $mock->nullableSelf();
- }
-
- /**
- * @test
- */
- public function itShouldAllowNullableSelfToBeNull()
- {
- $mock = $this->container->mock('test\Mockery\Fixtures\MethodWithNullableReturnType');
-
- $mock->shouldReceive('nullableSelf')->andReturn(null);
- $mock->nullableSelf();
- }
-
- /**
- * @test
- */
- public function itShouldAllowClassToBeSet()
- {
- $mock = $this->container->mock('test\Mockery\Fixtures\MethodWithNullableReturnType');
-
- $mock->shouldReceive('nonNullableClass')->andReturn(new MethodWithNullableReturnType());
- $mock->nonNullableClass();
- }
-
- /**
- * @test
- * @expectedException \TypeError
- */
- public function itShouldNotAllowClassToBeNull()
- {
- $mock = $this->container->mock('test\Mockery\Fixtures\MethodWithNullableReturnType');
-
- $mock->shouldReceive('nonNullableClass')->andReturn(null);
- $mock->nonNullableClass();
- }
-
- /**
- * @test
- */
- public function itShouldAllowNullalbeClassToBeSet()
- {
- $mock = $this->container->mock('test\Mockery\Fixtures\MethodWithNullableReturnType');
-
- $mock->shouldReceive('nullableClass')->andReturn(new MethodWithNullableReturnType());
- $mock->nullableClass();
- }
-
- /**
- * @test
- */
- public function itShouldAllowNullableClassToBeNull()
- {
- $mock = $this->container->mock('test\Mockery\Fixtures\MethodWithNullableReturnType');
-
- $mock->shouldReceive('nullableClass')->andReturn(null);
- $mock->nullableClass();
- }
-}
diff --git a/vendor/mockery/mockery/tests/Mockery/MockingParameterAndReturnTypesTest.php b/vendor/mockery/mockery/tests/Mockery/MockingParameterAndReturnTypesTest.php
deleted file mode 100644
index d4cb36cd791..00000000000
--- a/vendor/mockery/mockery/tests/Mockery/MockingParameterAndReturnTypesTest.php
+++ /dev/null
@@ -1,151 +0,0 @@
-container = new \Mockery\Container;
- }
-
- public function teardown()
- {
- $this->container->mockery_close();
- }
-
- public function testMockingStringReturnType()
- {
- $mock = $this->container->mock("test\Mockery\TestWithParameterAndReturnType");
-
- $mock->shouldReceive("returnString");
- $this->assertSame("", $mock->returnString());
- }
-
- public function testMockingIntegerReturnType()
- {
- $mock = $this->container->mock("test\Mockery\TestWithParameterAndReturnType");
-
- $mock->shouldReceive("returnInteger");
- $this->assertEquals(0, $mock->returnInteger());
- }
-
- public function testMockingFloatReturnType()
- {
- $mock = $this->container->mock("test\Mockery\TestWithParameterAndReturnType");
-
- $mock->shouldReceive("returnFloat");
- $this->assertSame(0.0, $mock->returnFloat());
- }
-
- public function testMockingBooleanReturnType()
- {
- $mock = $this->container->mock("test\Mockery\TestWithParameterAndReturnType");
-
- $mock->shouldReceive("returnBoolean");
- $this->assertSame(false, $mock->returnBoolean());
- }
-
- public function testMockingArrayReturnType()
- {
- $mock = $this->container->mock("test\Mockery\TestWithParameterAndReturnType");
-
- $mock->shouldReceive("returnArray");
- $this->assertSame([], $mock->returnArray());
- }
-
- public function testMockingGeneratorReturnTyps()
- {
- $mock = $this->container->mock("test\Mockery\TestWithParameterAndReturnType");
-
- $mock->shouldReceive("returnGenerator");
- $this->assertInstanceOf("\Generator", $mock->returnGenerator());
- }
-
- public function testMockingCallableReturnType()
- {
- $mock = $this->container->mock("test\Mockery\TestWithParameterAndReturnType");
-
- $mock->shouldReceive("returnCallable");
- $this->assertTrue(is_callable($mock->returnCallable()));
- }
-
- public function testMockingClassReturnTypes()
- {
- $mock = $this->container->mock("test\Mockery\TestWithParameterAndReturnType");
-
- $mock->shouldReceive("withClassReturnType");
- $this->assertInstanceOf("test\Mockery\TestWithParameterAndReturnType", $mock->withClassReturnType());
- }
-
- public function testMockingParameterTypes()
- {
- $mock = $this->container->mock("test\Mockery\TestWithParameterAndReturnType");
-
- $mock->shouldReceive("withScalarParameters");
- $mock->withScalarParameters(1, 1.0, true, 'string');
- }
-}
-
-
-abstract class TestWithParameterAndReturnType
-{
- public function returnString(): string
- {
- }
-
- public function returnInteger(): int
- {
- }
-
- public function returnFloat(): float
- {
- }
-
- public function returnBoolean(): bool
- {
- }
-
- public function returnArray(): array
- {
- }
-
- public function returnCallable(): callable
- {
- }
-
- public function returnGenerator(): \Generator
- {
- }
-
- public function withClassReturnType(): TestWithParameterAndReturnType
- {
- }
-
- public function withScalarParameters(int $integer, float $float, bool $boolean, string $string)
- {
- }
-}
diff --git a/vendor/mockery/mockery/tests/Mockery/MockingProtectedMethodsTest.php b/vendor/mockery/mockery/tests/Mockery/MockingProtectedMethodsTest.php
deleted file mode 100644
index 4f704f53292..00000000000
--- a/vendor/mockery/mockery/tests/Mockery/MockingProtectedMethodsTest.php
+++ /dev/null
@@ -1,122 +0,0 @@
-container = new \Mockery\Container;
- }
-
- public function teardown()
- {
- $this->container->mockery_close();
- }
-
- /**
- * @test
- *
- * This is a regression test, basically we don't want the mock handling
- * interfering with calling protected methods partials
- */
- public function shouldAutomaticallyDeferCallsToProtectedMethodsForPartials()
- {
- $mock = $this->container->mock("test\Mockery\TestWithProtectedMethods[foo]");
- $this->assertEquals("bar", $mock->bar());
- }
-
- /**
- * @test
- *
- * This is a regression test, basically we don't want the mock handling
- * interfering with calling protected methods partials
- */
- public function shouldAutomaticallyDeferCallsToProtectedMethodsForRuntimePartials()
- {
- $mock = $this->container->mock("test\Mockery\TestWithProtectedMethods")->shouldDeferMissing();
- $this->assertEquals("bar", $mock->bar());
- }
-
- /** @test */
- public function shouldAutomaticallyIgnoreAbstractProtectedMethods()
- {
- $mock = $this->container->mock("test\Mockery\TestWithProtectedMethods")->shouldDeferMissing();
- $this->assertEquals(null, $mock->foo());
- }
-
- /** @test */
- public function shouldAllowMockingProtectedMethods()
- {
- $mock = $this->container->mock("test\Mockery\TestWithProtectedMethods")
- ->shouldDeferMissing()
- ->shouldAllowMockingProtectedMethods();
-
- $mock->shouldReceive("protectedBar")->andReturn("notbar");
- $this->assertEquals("notbar", $mock->bar());
- }
-
- /** @test */
- public function shouldAllowMockingProtectedMethodOnDefinitionTimePartial()
- {
- $mock = $this->container->mock("test\Mockery\TestWithProtectedMethods[protectedBar]")
- ->shouldAllowMockingProtectedMethods();
-
- $mock->shouldReceive("protectedBar")->andReturn("notbar");
- $this->assertEquals("notbar", $mock->bar());
- }
-
- /** @test */
- public function shouldAllowMockingAbstractProtectedMethods()
- {
- $mock = $this->container->mock("test\Mockery\TestWithProtectedMethods")
- ->shouldDeferMissing()
- ->shouldAllowMockingProtectedMethods();
-
- $mock->shouldReceive("abstractProtected")->andReturn("abstractProtected");
- $this->assertEquals("abstractProtected", $mock->foo());
- }
-}
-
-
-abstract class TestWithProtectedMethods
-{
- public function foo()
- {
- return $this->abstractProtected();
- }
-
- abstract protected function abstractProtected();
-
- public function bar()
- {
- return $this->protectedBar();
- }
-
- protected function protectedBar()
- {
- return 'bar';
- }
-}
diff --git a/vendor/mockery/mockery/tests/Mockery/MockingVariadicArgumentsTest.php b/vendor/mockery/mockery/tests/Mockery/MockingVariadicArgumentsTest.php
deleted file mode 100644
index 39faa805db5..00000000000
--- a/vendor/mockery/mockery/tests/Mockery/MockingVariadicArgumentsTest.php
+++ /dev/null
@@ -1,56 +0,0 @@
-container = new \Mockery\Container;
- }
-
- public function teardown()
- {
- $this->container->mockery_close();
- }
-
- /** @test */
- public function shouldAllowMockingVariadicArguments()
- {
- $mock = $this->container->mock("test\Mockery\TestWithVariadicArguments");
-
- $mock->shouldReceive("foo")->andReturn("notbar");
- $this->assertEquals("notbar", $mock->foo());
- }
-}
-
-
-abstract class TestWithVariadicArguments
-{
- public function foo(...$bar)
- {
- return $bar;
- }
-}
diff --git a/vendor/mockery/mockery/tests/Mockery/MockingVoidMethodsTest.php b/vendor/mockery/mockery/tests/Mockery/MockingVoidMethodsTest.php
deleted file mode 100644
index 993efe66dce..00000000000
--- a/vendor/mockery/mockery/tests/Mockery/MockingVoidMethodsTest.php
+++ /dev/null
@@ -1,56 +0,0 @@
-container = new \Mockery\Container;
- }
-
- public function teardown()
- {
- $this->container->mockery_close();
- }
-
- /** @test */
- public function shouldAllowMockingVoidMethods()
- {
- $this->expectOutputString('1');
-
- $mock = $this->container->mock('test\Mockery\Fixtures\VoidMethod');
- $mock->shouldReceive("foo")->andReturnUsing(
- function () {
- echo 1;
- }
- );
-
- $mock->foo();
- }
-}
diff --git a/vendor/mockery/mockery/tests/Mockery/NamedMockTest.php b/vendor/mockery/mockery/tests/Mockery/NamedMockTest.php
deleted file mode 100644
index 28920072e90..00000000000
--- a/vendor/mockery/mockery/tests/Mockery/NamedMockTest.php
+++ /dev/null
@@ -1,54 +0,0 @@
-assertEquals("Mockery\Dave123", get_class($mock));
- }
-
- /** @test */
- public function itCreatesPassesFurtherArgumentsJustLikeMock()
- {
- $mock = Mockery::namedMock("Mockery\Dave456", "DateTime", array(
- "getDave" => "dave"
- ));
-
- $this->assertInstanceOf("DateTime", $mock);
- $this->assertEquals("dave", $mock->getDave());
- }
-
- /**
- * @test
- * @expectedException Mockery\Exception
- * @expectedExceptionMessage The mock named 'Mockery\Dave7' has been already defined with a different mock configuration
- */
- public function itShouldThrowIfAttemptingToRedefineNamedMock()
- {
- $mock = Mockery::namedMock("Mockery\Dave7");
- $mock = Mockery::namedMock("Mockery\Dave7", "DateTime");
- }
-}
diff --git a/vendor/mockery/mockery/tests/Mockery/RecorderTest.php b/vendor/mockery/mockery/tests/Mockery/RecorderTest.php
deleted file mode 100644
index ce8d3d3b6e1..00000000000
--- a/vendor/mockery/mockery/tests/Mockery/RecorderTest.php
+++ /dev/null
@@ -1,206 +0,0 @@
-container = new \Mockery\Container(\Mockery::getDefaultGenerator(), \Mockery::getDefaultLoader());
- }
-
- public function teardown()
- {
- $this->container->mockery_close();
- }
-
- public function testRecorderWithSimpleObject()
- {
- $mock = $this->container->mock(new MockeryTestSubject);
- $mock->shouldExpect(function ($subject) {
- $user = new MockeryTestSubjectUser($subject);
- $user->doFoo();
- });
-
- $this->assertEquals(1, $mock->foo());
- $mock->mockery_verify();
- }
-
- public function testArgumentsArePassedAsMethodExpectations()
- {
- $mock = $this->container->mock(new MockeryTestSubject);
- $mock->shouldExpect(function ($subject) {
- $user = new MockeryTestSubjectUser($subject);
- $user->doBar();
- });
-
- $this->assertEquals(4, $mock->bar(2));
- $mock->mockery_verify();
- }
-
- public function testArgumentsLooselyMatchedByDefault()
- {
- $mock = $this->container->mock(new MockeryTestSubject);
- $mock->shouldExpect(function ($subject) {
- $user = new MockeryTestSubjectUser($subject);
- $user->doBar();
- });
-
- $this->assertEquals(4, $mock->bar('2'));
- $mock->mockery_verify();
- }
-
- public function testMultipleMethodExpectations()
- {
- $mock = $this->container->mock(new MockeryTestSubject);
- $mock->shouldExpect(function ($subject) {
- $user = new MockeryTestSubjectUser($subject);
- $user->doFoo();
- $user->doBar();
- });
-
- $this->assertEquals(1, $mock->foo());
- $this->assertEquals(4, $mock->bar(2));
- $mock->mockery_verify();
- }
-
- public function testRecordingDoesNotSpecifyExactOrderByDefault()
- {
- $mock = $this->container->mock(new MockeryTestSubject);
- $mock->shouldExpect(function ($subject) {
- $user = new MockeryTestSubjectUser($subject);
- $user->doFoo();
- $user->doBar();
- });
-
- $this->assertEquals(4, $mock->bar(2));
- $this->assertEquals(1, $mock->foo());
- $mock->mockery_verify();
- }
-
- /**
- * @expectedException \Mockery\Exception
- */
- public function testRecordingDoesSpecifyExactOrderInStrictMode()
- {
- $mock = $this->container->mock(new MockeryTestSubject);
- $mock->shouldExpect(function ($subject) {
- $subject->shouldBeStrict();
- $user = new MockeryTestSubjectUser($subject);
- $user->doFoo();
- $user->doBar();
- });
-
- $mock->bar(2);
- $mock->foo();
- $mock->mockery_verify();
- }
-
- /**
- * @expectedException \Mockery\Exception
- */
- public function testArgumentsAreMatchedExactlyUnderStrictMode()
- {
- $mock = $this->container->mock(new MockeryTestSubject);
- $mock->shouldExpect(function ($subject) {
- $subject->shouldBeStrict();
- $user = new MockeryTestSubjectUser($subject);
- $user->doBar();
- });
-
- $mock->bar('2');
- }
-
- /**
- * @expectedException \Mockery\Exception
- */
- public function testThrowsExceptionWhenArgumentsNotExpected()
- {
- $mock = $this->container->mock(new MockeryTestSubject);
- $mock->shouldExpect(function ($subject) {
- $user = new MockeryTestSubjectUser($subject);
- $user->doBar();
- });
-
- $mock->bar(4);
- }
-
- public function testCallCountUnconstrainedByDefault()
- {
- $mock = $this->container->mock(new MockeryTestSubject);
- $mock->shouldExpect(function ($subject) {
- $user = new MockeryTestSubjectUser($subject);
- $user->doBar();
- });
-
- $mock->bar(2);
- $this->assertEquals(4, $mock->bar(2));
- $mock->mockery_verify();
- }
-
- /**
- * @expectedException \Mockery\CountValidator\Exception
- */
- public function testCallCountConstrainedInStrictMode()
- {
- $mock = $this->container->mock(new MockeryTestSubject);
- $mock->shouldExpect(function ($subject) {
- $subject->shouldBeStrict();
- $user = new MockeryTestSubjectUser($subject);
- $user->doBar();
- });
-
- $mock->bar(2);
- $mock->bar(2);
- $mock->mockery_verify();
- }
-}
-
-class MockeryTestSubject
-{
- public function foo()
- {
- return 1;
- }
- public function bar($i)
- {
- return $i * 2;
- }
-}
-
-class MockeryTestSubjectUser
-{
- public $subject = null;
- public function __construct($subject)
- {
- $this->subject = $subject;
- }
- public function doFoo()
- {
- return $this->subject->foo();
- }
- public function doBar()
- {
- return $this->subject->bar(2);
- }
-}
diff --git a/vendor/mockery/mockery/tests/Mockery/SpyTest.php b/vendor/mockery/mockery/tests/Mockery/SpyTest.php
deleted file mode 100644
index dc8192cb03e..00000000000
--- a/vendor/mockery/mockery/tests/Mockery/SpyTest.php
+++ /dev/null
@@ -1,78 +0,0 @@
-container = new \Mockery\Container;
- }
-
- public function teardown()
- {
- $this->container->mockery_close();
- }
-
- /** @test */
- public function itVerifiesAMethodWasCalled()
- {
- $spy = m::spy();
- $spy->myMethod();
- $spy->shouldHaveReceived("myMethod");
-
- $this->setExpectedException("Mockery\Exception\InvalidCountException");
- $spy->shouldHaveReceived("someMethodThatWasNotCalled");
- }
-
- /** @test */
- public function itVerifiesAMethodWasNotCalled()
- {
- $spy = m::spy();
- $spy->shouldNotHaveReceived("myMethod");
-
- $this->setExpectedException("Mockery\Exception\InvalidCountException");
- $spy->myMethod();
- $spy->shouldNotHaveReceived("myMethod");
- }
-
- /** @test */
- public function itVerifiesAMethodWasNotCalledWithParticularArguments()
- {
- $spy = m::spy();
- $spy->myMethod(123, 456);
-
- $spy->shouldNotHaveReceived("myMethod", array(789, 10));
-
- $this->setExpectedException("Mockery\Exception\InvalidCountException");
- $spy->shouldNotHaveReceived("myMethod", array(123, 456));
- }
-
- /** @test */
- public function itVerifiesAMethodWasCalledASpecificNumberOfTimes()
- {
- $spy = m::spy();
- $spy->myMethod();
- $spy->myMethod();
- $spy->shouldHaveReceived("myMethod")->twice();
-
- $this->setExpectedException("Mockery\Exception\InvalidCountException");
- $spy->myMethod();
- $spy->shouldHaveReceived("myMethod")->twice();
- }
-
- /** @test */
- public function itVerifiesAMethodWasCalledWithSpecificArguments()
- {
- $spy = m::spy();
- $spy->myMethod(123, "a string");
- $spy->shouldHaveReceived("myMethod")->with(123, "a string");
- $spy->shouldHaveReceived("myMethod", array(123, "a string"));
-
- $this->setExpectedException("Mockery\Exception\InvalidCountException");
- $spy->shouldHaveReceived("myMethod")->with(123);
- }
-}
diff --git a/vendor/mockery/mockery/tests/Mockery/Test/Generator/MockConfigurationBuilderTest.php b/vendor/mockery/mockery/tests/Mockery/Test/Generator/MockConfigurationBuilderTest.php
deleted file mode 100644
index e077ba315fc..00000000000
--- a/vendor/mockery/mockery/tests/Mockery/Test/Generator/MockConfigurationBuilderTest.php
+++ /dev/null
@@ -1,43 +0,0 @@
-assertContains('abstract', $builder->getMockConfiguration()->getBlackListedMethods());
-
- // need a builtin for this
- $this->markTestSkipped("Need a builtin class with a method that is a reserved word");
- }
-
- /**
- * @test
- */
- public function magicMethodsAreBlackListedByDefault()
- {
- $builder = new MockConfigurationBuilder;
- $builder->addTarget("Mockery\Generator\ClassWithMagicCall");
- $methods = $builder->getMockConfiguration()->getMethodsToMock();
- $this->assertEquals(1, count($methods));
- $this->assertEquals("foo", $methods[0]->getName());
- }
-}
-
-class ClassWithMagicCall
-{
- public function foo()
- {
- }
- public function __call($method, $args)
- {
- }
-}
diff --git a/vendor/mockery/mockery/tests/Mockery/WithFormatterExpectationTest.php b/vendor/mockery/mockery/tests/Mockery/WithFormatterExpectationTest.php
deleted file mode 100644
index 536405f80ad..00000000000
--- a/vendor/mockery/mockery/tests/Mockery/WithFormatterExpectationTest.php
+++ /dev/null
@@ -1,121 +0,0 @@
-assertEquals(
- $expected,
- Mockery::formatObjects($args)
- );
- }
-
- /**
- * @expectedException Mockery\Exception\NoMatchingExpectationException
- *
- * Note that without the patch checked in with this test, rather than throwing
- * an exception, the program will go into an infinite recursive loop
- */
- public function testFormatObjectsWithMockCalledInGetterDoesNotLeadToRecursion()
- {
- $mock = Mockery::mock('stdClass');
- $mock->shouldReceive('doBar')->with('foo');
- $obj = new ClassWithGetter($mock);
- $obj->getFoo();
- }
-
- public function formatObjectsDataProvider()
- {
- return array(
- array(
- array(null),
- ''
- ),
- array(
- array('a string', 98768, array('a', 'nother', 'array')),
- ''
- ),
- );
- }
-
- /** @test */
- public function format_objects_should_not_call_getters_with_params()
- {
- $obj = new ClassWithGetterWithParam();
- $string = Mockery::formatObjects(array($obj));
-
- $this->assertNotContains('Missing argument 1 for', $string);
- }
-
- public function testFormatObjectsExcludesStaticProperties()
- {
- $obj = new ClassWithPublicStaticProperty();
- $string = Mockery::formatObjects(array($obj));
-
- $this->assertNotContains('excludedProperty', $string);
- }
-
- public function testFormatObjectsExcludesStaticGetters()
- {
- $obj = new ClassWithPublicStaticGetter();
- $string = Mockery::formatObjects(array($obj));
-
- $this->assertNotContains('getExcluded', $string);
- }
-}
-
-class ClassWithGetter
-{
- private $dep;
-
- public function __construct($dep)
- {
- $this->dep = $dep;
- }
-
- public function getFoo()
- {
- return $this->dep->doBar('bar', $this);
- }
-}
-
-class ClassWithGetterWithParam
-{
- public function getBar($bar)
- {
- }
-}
-
-class ClassWithPublicStaticProperty
-{
- public static $excludedProperty;
-}
-
-class ClassWithPublicStaticGetter
-{
- public static function getExcluded()
- {
- }
-}
diff --git a/vendor/mockery/mockery/tests/Mockery/_files/file.txt b/vendor/mockery/mockery/tests/Mockery/_files/file.txt
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/vendor/mockery/mockery/travis/after_success.sh b/vendor/mockery/mockery/travis/after_success.sh
deleted file mode 100755
index f1553ec506b..00000000000
--- a/vendor/mockery/mockery/travis/after_success.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/bash
-if [[ $TRAVIS_PHP_VERSION == "5.6" ]]; then
- vendor/bin/coveralls -v
- wget https://scrutinizer-ci.com/ocular.phar
- php ocular.phar code-coverage:upload --format=php-clover ./build/logs/clover.xml
-fi
diff --git a/vendor/mockery/mockery/travis/before_script.sh b/vendor/mockery/mockery/travis/before_script.sh
deleted file mode 100755
index 102c39ad866..00000000000
--- a/vendor/mockery/mockery/travis/before_script.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/bash
-if [[ $TRAVIS_PHP_VERSION != "hhvm" \
- && $TRAVIS_PHP_VERSION != "hhvm-nightly" \
- && $TRAVIS_PHP_VERSION != "7.0" ]]; then
- phpenv config-add ./travis/extra.ini
- phpenv rehash
-fi
-
-if [[ $TRAVIS_PHP_VERSION == "5.6" ]]; then
- sed '/MockeryPHPUnitIntegration/d' -i ./phpunit.xml.dist
-fi
diff --git a/vendor/mockery/mockery/travis/extra.ini b/vendor/mockery/mockery/travis/extra.ini
deleted file mode 100644
index 897166d96f9..00000000000
--- a/vendor/mockery/mockery/travis/extra.ini
+++ /dev/null
@@ -1,2 +0,0 @@
-extension = "mongo.so"
-extension = "redis.so"
\ No newline at end of file
diff --git a/vendor/mockery/mockery/travis/install.sh b/vendor/mockery/mockery/travis/install.sh
deleted file mode 100755
index 6ccf4cff764..00000000000
--- a/vendor/mockery/mockery/travis/install.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/bash
-composer install -n
-
-if [[ $TRAVIS_PHP_VERSION == "5.6" ]]; then
- composer require --dev satooshi/php-coveralls:~0.7@dev
-fi
diff --git a/vendor/mockery/mockery/travis/script.sh b/vendor/mockery/mockery/travis/script.sh
deleted file mode 100755
index 7ef810af3e8..00000000000
--- a/vendor/mockery/mockery/travis/script.sh
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/bash
-if [[ $TRAVIS_PHP_VERSION != "hhvm" \
- && $TRAVIS_PHP_VERSION != "hhvm-nightly" \
- && $TRAVIS_PHP_VERSION != "7.0" ]]; then
- vendor/bin/phpunit --coverage-text --coverage-clover ./build/logs/clover.xml
-else
- vendor/bin/phpunit
-fi
diff --git a/vendor/php-coveralls/php-coveralls/.gitignore b/vendor/php-coveralls/php-coveralls/.gitignore
deleted file mode 100644
index 1f0e94c7152..00000000000
--- a/vendor/php-coveralls/php-coveralls/.gitignore
+++ /dev/null
@@ -1,26 +0,0 @@
-# eclipse
-.buildpath
-.project
-.settings/
-
-# PHP prj
-build/
-cache.properties
-
-# composer
-vendor/
-composer.lock
-
-# travis
-travis/
-
-# bin
-composer.phar
-php-cs-fixer.phar
-
-.coveralls.yml
-.php_cs
-.php_cs.cache
-phpunit.xml
-
-box.phar
diff --git a/vendor/php-coveralls/php-coveralls/.php_cs.dist b/vendor/php-coveralls/php-coveralls/.php_cs.dist
deleted file mode 100644
index e3486a1e8cd..00000000000
--- a/vendor/php-coveralls/php-coveralls/.php_cs.dist
+++ /dev/null
@@ -1,28 +0,0 @@
-setRiskyAllowed(true)
- ->setRules(array(
- '@Symfony' => true,
- '@Symfony:risky' => true,
- 'array_syntax' => array('syntax' => 'long'),
- 'combine_consecutive_unsets' => true,
- 'concat_space' => array('spacing' => 'one'),
- 'heredoc_to_nowdoc' => true,
- 'no_extra_consecutive_blank_lines' => array('break', 'continue', 'extra', 'return', 'throw', 'use', 'parenthesis_brace_block', 'square_brace_block', 'curly_brace_block'),
- 'no_unreachable_default_argument_value' => true,
- 'no_useless_else' => true,
- 'ordered_imports' => true,
- 'php_unit_strict' => true,
- 'phpdoc_no_package' => false,
- 'phpdoc_order' => true,
- 'psr4' => true,
- 'strict_comparison' => true,
- 'strict_param' => true,
- ))
- ->setFinder(
- PhpCsFixer\Finder::create()
- ->in(__DIR__ . '/tests/Satooshi')
- ->in(__DIR__ . '/src')
- )
-;
diff --git a/vendor/php-coveralls/php-coveralls/.travis.yml b/vendor/php-coveralls/php-coveralls/.travis.yml
deleted file mode 100644
index 9674b7d9cd2..00000000000
--- a/vendor/php-coveralls/php-coveralls/.travis.yml
+++ /dev/null
@@ -1,62 +0,0 @@
-sudo: false
-dist: trusty
-language: php
-
-matrix:
- include:
- - php: 5.3
- dist: precise
- env: 'COMPOSER_FLAGS="--prefer-stable --prefer-lowest"'
- - php: 5.3
- dist: precise
- env: 'BOX=yes'
- - php: 5.4
- - php: 5.5
- - php: 5.6
- - php: 7.0
- env: CHECKS=yes
- - php: 7.1
- env: SYMFONY_VERSION="^3.0"
- - php: 7.2
- env: SYMFONY_VERSION="^4.0" MIN_STABILITY=dev
- - php: hhvm
-
-cache:
- directories:
- - $HOME/.composer/cache
-
-install:
- - mkdir -p build/logs
- - mv ${HOME}/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini ${HOME}/xdebug.ini || return 0
- - if [ "$TRAVIS_PHP_VERSION" == "5.3.3" ]; then composer config disable-tls true; fi
- - if [ "$TRAVIS_PHP_VERSION" == "5.3.3" ]; then composer config secure-http false; fi
- - 'if [ "$MIN_STABILITY" != "" ]; then composer config minimum-stability $MIN_STABILITY; fi'
- - 'if [ "$SYMFONY_VERSION" != "" ]; then sed -i "s/\"symfony\/\([^\"]*\)\": \"^2[^\"]*\"/\"symfony\/\1\": \"$SYMFONY_VERSION\"/g" composer.json; fi'
- - travis_retry composer update ${COMPOSER_FLAGS} --no-interaction
- - if [ "$CHECKS" = "yes" ]; then travis_retry composer install-devtools; fi;
-
-script:
- - cp ${HOME}/xdebug.ini ${HOME}/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini || return 0
- - vendor/bin/phpunit
- - rm ${HOME}/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini || return 0
- - if [ "$CHECKS" = "yes" ]; then composer sca; fi;
-
-after_success:
- - bin/coveralls -v --exclude-no-stmt
-
-before_deploy:
- - if [ "${BOX}" = "yes" ]; then curl -LSs http://box-project.github.io/box2/installer.php | php; fi;
- - if [ "${BOX}" = "yes" ]; then composer update --no-dev --no-interaction ${COMPOSER_FLAGS}; fi;
- - if [ "${BOX}" = "yes" ]; then php -d phar.readonly=false box.phar build; fi;
-
-deploy:
- provider: releases
- api_key:
- secure: dNw8/urkXHRHzcI0F8NwYP63FjhcrpUqOO92uclAYESBjyVyhBzMuczBlGfwqdoxknwK+4wsDkr6TW7AtfeTa3d48acHdUD3ahWFFk9paC8jIVsh/H01UMsY3Xz4Z3KVWQDRFS5LIaDKk3jqPyvN+FiJpEQ8drIA+GDpm4VSQHc=
- file: build/artifacts/coveralls.phar
- skip_cleanup: true
- on:
- repo: php-coveralls/php-coveralls
- tags: true
- all_branches: true
- condition: $BOX = yes
diff --git a/vendor/php-coveralls/php-coveralls/AUTHORS b/vendor/php-coveralls/php-coveralls/AUTHORS
deleted file mode 100644
index fe57ed8f626..00000000000
--- a/vendor/php-coveralls/php-coveralls/AUTHORS
+++ /dev/null
@@ -1,18 +0,0 @@
-Kitamura Satoshi
-
-acorncom
-Bart Feenstra
-Benjamin Morel
-Dariusz Ruminski
-Eric GELOEN
-Graham Campbell
-Haralan Dobrev
-Juan Manuel Torres
-Julien Bianchi
-Justin
-Paul Croker
-Phil Sturgeon
-Renan Gonçalves
-Tobias Nyholm
-Yevgen Kovalienia
-Google Inc
diff --git a/vendor/php-coveralls/php-coveralls/CHANGELOG.md b/vendor/php-coveralls/php-coveralls/CHANGELOG.md
deleted file mode 100644
index ecc1e37e056..00000000000
--- a/vendor/php-coveralls/php-coveralls/CHANGELOG.md
+++ /dev/null
@@ -1,156 +0,0 @@
-CHANGELOG
-=============
-
-## 1.1.0
-
-### Enhancement
-- [#192](https://github.com/php-coveralls/php-coveralls/pull/192) let output json path be configurable
-
-## 1.0.2
-
-### Misc
-- Update github repo link
-- [#250](https://github.com/php-coveralls/php-coveralls/pull/250) GitCommand - drop useless tests
-- [#248](https://github.com/php-coveralls/php-coveralls/pull/248) Allow Symfony 4
-- [#249](https://github.com/php-coveralls/php-coveralls/pull/249) Allow PHPUnit 6
-- [#224](https://github.com/php-coveralls/php-coveralls/pull/224) Travis - update used ubuntu dist
-- [#212](https://github.com/php-coveralls/php-coveralls/pull/212) update PHP CS Fixer
-- Use stable and semantic version constrains
-- Start v1.0.2 development
-- Phpdoc
-
-## 1.0.1
-
-### Misc
-- [#183](https://github.com/php-coveralls/php-coveralls/pull/183) Lower required version of symfony/*
-
-## 1.0.0
-
-### miscellaneous
-- [#136](https://github.com/php-coveralls/php-coveralls/pull/136) Removed src_dir from CoverallsConfiguration
-- [#154](https://github.com/php-coveralls/php-coveralls/issues/154) Show a deprecation notice when src_dir is set in the config
-
-## 0.7.0
-
-### Bug fix
-
-- [#30](https://github.com/php-coveralls/php-coveralls/issues/30) Fix bug: Guzzle\Common\Exception\RuntimeException occur without response body
-- [#41](https://github.com/php-coveralls/php-coveralls/issues/41) CloverXmlCoverageCollector could not handle root directory
-- [#114](https://github.com/php-coveralls/php-coveralls/pull/114) Fix PHP 5.3.3, Fix HHVM on Travis, boost Travis configuration, enhance PHP CS Fixer usage
-
-### Enhancement
-
-- [#15](https://github.com/php-coveralls/php-coveralls/issues/15) Support environment prop in json_file
-- [#24](https://github.com/php-coveralls/php-coveralls/issues/24) Show helpful message if the requirements are not satisfied
-- [#53](https://github.com/php-coveralls/php-coveralls/issues/53) Setting configuration options through command line flags
- - Added --root_dir and --coverage_clover flags
-- [#64](https://github.com/php-coveralls/php-coveralls/issues/64) file names need to be relative to the git repo root
-- [#114](https://github.com/php-coveralls/php-coveralls/pull/114) Fix PHP 5.3.3, Fix HHVM on Travis, boost Travis configuration, enhance PHP CS Fixer usage
-- [#124](https://github.com/php-coveralls/php-coveralls/pull/124) Create a .phar file
-- [#149](https://github.com/php-coveralls/php-coveralls/pull/149) Build phar file on travis
-- [#127](https://github.com/php-coveralls/php-coveralls/issues/126) Remove src_dir entirely
-
-### miscellaneous
-
-- [#17](https://github.com/php-coveralls/php-coveralls/issues/17) Refactor test cases
-- [#32](https://github.com/php-coveralls/php-coveralls/issues/32) Refactor CoverallsV1JobsCommand
-- [#35](https://github.com/php-coveralls/php-coveralls/issues/35) Remove ext-curl dependency
-- [#38](https://github.com/php-coveralls/php-coveralls/issues/38) Change namespace
-- [#114](https://github.com/php-coveralls/php-coveralls/pull/114) PHP 7.0.0 is now officially supported
-
-## 0.6.1 (2013-05-04)
-
-### Bug fix
-
-- [#27](https://github.com/php-coveralls/php-coveralls/issues/27) Fix bug: Response message is not shown if exception occurred
-
-### Enhancement
-
-- [#23](https://github.com/php-coveralls/php-coveralls/issues/23) Add CLI option: `--exclude-no-stmt`
-- [#23](https://github.com/php-coveralls/php-coveralls/issues/23) Add .coveralls.yml configuration: `exclude_no_stmt`
-
-
-## 0.6.0 (2013-05-03)
-
-### Bug fix
-
-- Fix bug: Show exception log at sending a request instead of exception backtrace
-- [#12](https://github.com/php-coveralls/php-coveralls/issues/12) Fix bug: end of file should not be included in code coverage
-- [#21](https://github.com/php-coveralls/php-coveralls/issues/21) Fix bug: add connection error handling
-
-### Enhancement
-
-- [#11](https://github.com/php-coveralls/php-coveralls/issues/11) Support configuration for multiple clover.xml
-- [#14](https://github.com/php-coveralls/php-coveralls/issues/14) Log enhancement
- - show file size of `json_file`
- - show number of included source files
- - show elapsed time and memory usage
- - show coverage
- - show response message
-- [#18](https://github.com/php-coveralls/php-coveralls/issues/18) Relax dependent libs version
-
-## 0.5.0 (2013-04-29)
-
-### Bug fix
-
-- Fix bug: only existing file lines should be included in coverage data
-
-### Enhancement
-
-- `--verbose (-v)` CLI option enables logging
-- Support standardized env vars ([Codeship](https://www.codeship.io) supported these env vars)
- - CI_NAME
- - CI_BUILD_NUMBER
- - CI_BUILD_URL
- - CI_BRANCH
- - CI_PULL_REQUEST
-
-### miscellaneous
-
-- Refactor console logging (PSR-3 compliant)
-- Change composer's minimal stability from dev to stable
-
-## 0.4.0 (2013-04-21)
-
-### Bug fix
-
-- Fix bug: `repo_token` is required on CircleCI, Jenkins
-
-### Enhancement
-
-- Replace REST client implementation by [guzzle/guzzle](https://github.com/guzzle/guzzle)
-
-## 0.3.2 (2013-04-20)
-
-### Bug fix
-
-- Fix bug: API reqest from local environment should be with repo_token
-- Fix bug: service_name in .coveralls.yml will not reflect to json_file
-
-## 0.3.1 (2013-04-19)
-
-### Bug fix
-
-- [#1](Installing with composer issue) Fix bug: wrong bin path of composer.json ([@zomble](https://github.com/zomble)).
-
-## 0.3.0 (2013-04-19)
-
-### Enhancement
-
-- Better CLI implementation by using [symfony/Console](https://github.com/symfony/Console) component
-- Support `--dry-run`, `--config (-c)` CLI option
-
-## 0.2.0 (2013-04-18)
-
-### Enhancement
-
-- Support .coveralls.yml
-
-## 0.1.0 (2013-04-15)
-
-First release.
-
-- Support Travis CI (tested)
-- Implement CircleCI, Jenkins, local environment (but not tested on these CI environments)
-- Collect coverage information from clover.xml
-- Collect git repository information
diff --git a/vendor/php-coveralls/php-coveralls/LICENSE b/vendor/php-coveralls/php-coveralls/LICENSE
deleted file mode 100644
index c70ef21cfaf..00000000000
--- a/vendor/php-coveralls/php-coveralls/LICENSE
+++ /dev/null
@@ -1,22 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2013 Kitamura Satoshi
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/vendor/php-coveralls/php-coveralls/README.md b/vendor/php-coveralls/php-coveralls/README.md
deleted file mode 100644
index cf24ca134fc..00000000000
--- a/vendor/php-coveralls/php-coveralls/README.md
+++ /dev/null
@@ -1,335 +0,0 @@
-php-coveralls
-=============
-
-[![Build Status](https://travis-ci.org/php-coveralls/php-coveralls.png?branch=master)](https://travis-ci.org/php-coveralls/php-coveralls)
-[![Coverage Status](https://coveralls.io/repos/php-coveralls/php-coveralls/badge.png?branch=master)](https://coveralls.io/r/php-coveralls/php-coveralls)
-[![Dependency Status](https://www.versioneye.com/package/php--satooshi--php-coveralls/badge.png)](https://www.versioneye.com/package/php--satooshi--php-coveralls)
-
-[![Latest Stable Version](https://poser.pugx.org/php-coveralls/php-coveralls/v/stable.png)](https://packagist.org/packages/php-coveralls/php-coveralls)
-[![Total Downloads](https://poser.pugx.org/php-coveralls/php-coveralls/downloads.png)](https://packagist.org/packages/php-coveralls/php-coveralls)
-
-PHP client library for [Coveralls](https://coveralls.io).
-
-# Prerequisites
-
-- PHP 5.3 or later
-- On [GitHub](https://github.com/)
-- Building on [Travis CI](http://travis-ci.org/), [CircleCI](https://circleci.com/), [Jenkins](http://jenkins-ci.org/) or [Codeship](https://www.codeship.io/)
-- Testing by [PHPUnit](https://github.com/sebastianbergmann/phpunit/) or other testing framework that can generate clover style coverage report
-
-# Installation
-
-## Download phar file
-
-We started to create a phar file, starting from the version 0.7.0
-release. It is available at the URLs like:
-
-```
-https://github.com/php-coveralls/php-coveralls/releases/download/v1.0.0/coveralls.phar
-```
-
-Download the file and add exec permissions:
-
-```sh
-$ wget https://github.com/php-coveralls/php-coveralls/releases/download/v1.0.0/coveralls.phar
-$ chmod +x coveralls.phar
-```
-
-## Install by composer
-
-To install php-coveralls with Composer, run the following command:
-
-```sh
-$ composer require php-coveralls/php-coveralls --dev
-```
-
-You can see this library on [Packagist](https://packagist.org/packages/php-coveralls/php-coveralls).
-
-Composer installs autoloader at `./vendor/autoloader.php`. If you use
-php-coveralls in your php script, add:
-
-```php
-require_once 'vendor/autoload.php';
-```
-
-If you use Symfony2, autoloader has to be detected automatically.
-
-
-## Use it from your git clone
-
-Or you can use git clone command:
-
-```sh
-# HTTP
-$ git clone https://github.com/php-coveralls/php-coveralls.git
-# SSH
-$ git clone git@github.com:php-coveralls/php-coveralls.git
-```
-
-# Configuration
-
-Currently php-coveralls supports clover style coverage report and collects coverage information from `clover.xml`.
-
-## PHPUnit
-
-Make sure that `phpunit.xml.dist` is configured to generate "coverage-clover" type log named `clover.xml` like the following configuration:
-
-```xml
-
-
-
- ...
-
- ...
-
-
-```
-
-You can also use `--coverage-clover` CLI option.
-
-```sh
-phpunit --coverage-clover build/logs/clover.xml
-```
-
-### phpcov
-
-Above settings are good for most projects if your test suite is executed once a build and is not divided into several parts. But if your test suite is configured as parallel tasks or generates multiple coverage reports through a build, you can use either `coverage_clover` configuration in `.coveralls.yml` ([see below coverage clover configuration section](#coverage-clover-configuration)) to specify multiple `clover.xml` files or `phpcov` for processing coverage reports.
-
-#### composer.json
-
-```json
- "require-dev": {
- "php-coveralls/php-coveralls": "^1.0",
- "phpunit/phpcov": "^2.0"
- },
-```
-
-#### phpunit configuration
-
-Make sure that `phpunit.xml.dist` is configured to generate "coverage-php" type log:
-
-```xml
-
-
-
- ...
-
- ...
-
-
-```
-
-You can also use `--coverage-php` CLI option.
-
-```sh
-# use --coverage-php option instead of --coverage-clover
-phpunit --coverage-php build/cov/coverage-${component_name}.cov
-```
-
-#### phpcov configuration
-
-And then, execute `phpcov.php` to merge `coverage.cov` logs.
-
-```sh
-# get information
-php vendor/bin/phpcov.php --help
-
-# merge coverage.cov logs under build/cov
-php vendor/bin/phpcov.php merge --clover build/logs/clover.xml build/cov
-
-# in case of memory exhausting error
-php -d memory_limit=-1 vendor/bin/phpcov.php ...
-```
-
-### clover.xml
-
-php-coveralls collects `count` attribute in a `line` tag from `clover.xml` if its `type` attribute equals to `stmt`. When `type` attribute equals to `method`, php-coveralls excludes its `count` attribute from coverage collection because abstract method in an abstract class is never counted though subclasses implement that method which is executed in test cases.
-
-```xml
-
-
-
-
-```
-
-## Travis CI
-
-Add `php coveralls.phar` or `php vendor/bin/coveralls` to your `.travis.yml` at `after_success`.
-
-```yml
-# .travis.yml
-language: php
-php:
- - 5.5
- - 5.4
- - 5.3
-
-matrix:
- allow_failures:
- - php: 5.5
-
-install:
- - curl -s http://getcomposer.org/installer | php
- - php composer.phar install --dev --no-interaction
-script:
- - mkdir -p build/logs
- - php vendor/bin/phpunit -c phpunit.xml.dist
-
-after_success:
- - travis_retry php vendor/bin/coveralls
- # or enable logging
- - travis_retry php vendor/bin/coveralls -v
-```
-
-## CircleCI
-
-Enable Xdebug in your `circle.yml` at `dependencies` section since currently Xdebug extension is not pre-enabled. `composer` and `phpunit` are pre-installed but you can install them manually in this dependencies section. The following sample uses default ones.
-
-```yml
-machine:
- php:
- version: 5.4.10
-
-## Customize dependencies
-dependencies:
- override:
- - mkdir -p build/logs
- - composer install --dev --no-interaction
- - sed -i 's/^;//' ~/.phpenv/versions/$(phpenv global)/etc/conf.d/xdebug.ini
-
-## Customize test commands
-test:
- override:
- - phpunit -c phpunit.xml.dist
-```
-
-Add `COVERALLS_REPO_TOKEN` environment variable with your coveralls repo token on Web UI (Tweaks -> Environment Variable).
-
-## Codeship
-
-You can configure CI process for Coveralls by adding the following commands to the textarea on Web UI (Project settings > Test tab).
-
-In the "Modify your Setup Commands" section:
-
-```sh
-curl -s http://getcomposer.org/installer | php
-php composer.phar install --dev --no-interaction
-mkdir -p build/logs
-```
-
-In the "Modify your Test Commands" section:
-
-```sh
-php vendor/bin/phpunit -c phpunit.xml.dist
-php vendor/bin/coveralls
-```
-
-Next, open Project settings > Environment tab, you can set `COVERALLS_REPO_TOKEN` environment variable.
-
-In the "Configure your environment variables" section:
-
-```sh
-COVERALLS_REPO_TOKEN=your_token
-```
-
-## From local environment
-
-If you would like to call Coveralls API from your local environment, you can set `COVERALLS_RUN_LOCALLY` environment variable. This configuration requires `repo_token` to specify which project on Coveralls your project maps to. This can be done by configuring `.coveralls.yml` or `COVERALLS_REPO_TOKEN` environment variable.
-
-```sh
-$ export COVERALLS_RUN_LOCALLY=1
-
-# either env var
-$ export COVERALLS_REPO_TOKEN=your_token
-
-# or .coveralls.yml configuration
-$ vi .coveralls.yml
-repo_token: your_token # should be kept secret!
-```
-
-php-coveralls set the following properties to `json_file` which is sent to Coveralls API (same behaviour as the Ruby library will do except for the service name).
-
-- service_name: php-coveralls
-- service_event_type: manual
-
-## CLI options
-
-You can get help information for `coveralls` with the `--help (-h)` option.
-
-```sh
-php vendor/bin/coveralls --help
-```
-
-- `--config (-c)`: Used to specify the path to `.coveralls.yml`. Default is `.coveralls.yml`
-- `--verbose (-v)`: Used to show logs.
-- `--dry-run`: Used not to send json_file to Coveralls Jobs API.
-- `--exclude-no-stmt`: Used to exclude source files that have no executable statements.
-- `--env (-e)`: Runtime environment name: test, dev, prod (default: "prod")
-- `--coverage_clover (-x)`: Coverage clover xml files(allowing multiple values)
-- `--json_path` (-o): Used to specify where to output json_file that will be
- uploaded to Coveralls API. (default: `build/logs/coveralls-upload.json`)
-- `--root_dir (-r)`: Root directory of the project. (default: ".")
-
-## .coveralls.yml
-
-php-coveralls can use optional `.coveralls.yml` file to configure options. This configuration file is usually at the root level of your repository, but you can specify other path by `--config (or -c)` CLI option. Following options are the same as Ruby library ([see reference on coveralls.io](https://coveralls.io/docs/ruby)).
-
-- `repo_token`: Used to specify which project on Coveralls your project maps to. This is only needed for repos not using CI and should be kept secret
-- `service_name`: Allows you to specify where Coveralls should look to find additional information about your builds. This can be any string, but using `travis-ci` or `travis-pro` will allow Coveralls to fetch branch data, comment on pull requests, and more.
-
-Following options can be used for php-coveralls.
-
-- `coverage_clover`: Used to specify the path to `clover.xml`. Default is `build/logs/clover.xml`
-- `json_path`: Used to specify where to output `json_file` that will be uploaded to Coveralls API. Default is `build/logs/coveralls-upload.json`.
-
-```yml
-# .coveralls.yml example configuration
-
-# same as Ruby lib
-repo_token: your_token # should be kept secret!
-service_name: travis-pro # travis-ci or travis-pro
-
-# for php-coveralls
-coverage_clover: build/logs/clover.xml
-json_path: build/logs/coveralls-upload.json
-```
-
-### coverage clover configuration
-
-You can specify multiple `clover.xml` logs at `coverage_clover`. This is useful for a project that has more than two test suites if all of the test results should be merged into one `json_file`.
-
-```yml
-#.coveralls.yml
-
-# single file
-coverage_clover: build/logs/clover.xml
-
-# glob
-coverage_clover: build/logs/clover-*.xml
-
-# array
-# specify files
-coverage_clover:
- - build/logs/clover-Auth.xml
- - build/logs/clover-Db.xml
- - build/logs/clover-Validator.xml
-```
-
-You can also use `--coverage_clover` (or `-x`) command line option as follows:
-
-```
-coveralls --coverage_clover=build/logs/my-clover.xml
-```
-
-### root_dir detection and override
-
-This tool assume the current directory is the project root directory by default. You can override it with `--root_dir` command line option.
-
-
-# Change log
-
-[See changelog](CHANGELOG.md)
-
-# Wiki
-
-[See wiki](https://github.com/php-coveralls/php-coveralls/wiki)
diff --git a/vendor/php-coveralls/php-coveralls/bin/coveralls b/vendor/php-coveralls/php-coveralls/bin/coveralls
deleted file mode 100755
index ec8f9b3a469..00000000000
--- a/vendor/php-coveralls/php-coveralls/bin/coveralls
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/usr/bin/env php
-run();
diff --git a/vendor/php-coveralls/php-coveralls/box.json b/vendor/php-coveralls/php-coveralls/box.json
deleted file mode 100644
index 2cda9378a42..00000000000
--- a/vendor/php-coveralls/php-coveralls/box.json
+++ /dev/null
@@ -1,23 +0,0 @@
-{
- "alias": "coveralls.phar",
- "chmod": "0755",
- "directories": ["src"],
- "compactors": [
- "Herrera\\Box\\Compactor\\Php"
- ],
- "extract": true,
- "files": [
- "LICENSE"
- ],
- "finder": [
- {
- "name": ["*.php", "*.pem"],
- "exclude": ["tests"],
- "in": ["vendor"]
- }
- ],
- "git-version": "package_version",
- "main": "bin/coveralls",
- "output": "build/artifacts/coveralls.phar",
- "stub": true
-}
diff --git a/vendor/php-coveralls/php-coveralls/circle.yml b/vendor/php-coveralls/php-coveralls/circle.yml
deleted file mode 100644
index d3a39f7670a..00000000000
--- a/vendor/php-coveralls/php-coveralls/circle.yml
+++ /dev/null
@@ -1,16 +0,0 @@
-machine:
- timezone: America/Los_Angeles
- php:
- version: 5.3.3
-
-dependencies:
- override:
- - mkdir -p build/logs
- - composer update --prefer-stable --prefer-lowest --no-interaction
- - sed -i 's/^;//' ~/.phpenv/versions/$(phpenv global)/etc/conf.d/xdebug.ini
-
-test:
- override:
- - phpunit
- post:
- - bin/coveralls -v --exclude-no-stmt
diff --git a/vendor/php-coveralls/php-coveralls/composer.json b/vendor/php-coveralls/php-coveralls/composer.json
deleted file mode 100644
index 720a5ee3557..00000000000
--- a/vendor/php-coveralls/php-coveralls/composer.json
+++ /dev/null
@@ -1,55 +0,0 @@
-{
- "name": "php-coveralls/php-coveralls",
- "description": "PHP client library for Coveralls API",
- "keywords": ["coverage", "github", "test", "ci"],
- "homepage": "https://github.com/php-coveralls/php-coveralls",
- "type": "library",
- "license": "MIT",
- "authors": [
- {
- "name": "Kitamura Satoshi",
- "email": "with.no.parachute@gmail.com",
- "homepage": "https://www.facebook.com/satooshi.jp"
- }
- ],
- "require": {
- "php": "^5.3.3 || ^7.0",
- "ext-json": "*",
- "ext-simplexml": "*",
- "guzzle/guzzle": "^2.8 || ^3.0",
- "psr/log": "^1.0",
- "symfony/config": "^2.1 || ^3.0 || ^4.0",
- "symfony/console": "^2.1 || ^3.0 || ^4.0",
- "symfony/stopwatch": "^2.0 || ^3.0 || ^4.0",
- "symfony/yaml": "^2.0 || ^3.0 || ^4.0"
- },
- "require-dev": {
- "phpunit/phpunit": "^4.8.35 || ^5.4.3 || ^6.0"
- },
- "suggest": {
- "symfony/http-kernel": "Allows Symfony integration"
- },
- "autoload": {
- "psr-4": { "Satooshi\\": "src/Satooshi/" }
- },
- "autoload-dev": {
- "psr-4": { "Satooshi\\": "tests/Satooshi/" }
- },
- "bin": ["bin/coveralls"],
- "scripts": {
- "install-devtools": [
- "cd devtools && composer update --no-interaction"
- ],
- "sca": [
- "php devtools/vendor/bin/php-cs-fixer fix --dry-run -vv",
- "php devtools/vendor/bin/phpcs --standard=build/config/phpcs.xml --ignore=*.html.php,*.config.php,*.twig.php src",
- "php devtools/vendor/bin/phpmd src text build/config/phpmd.xml"
- ],
- "apigen": [
- "php devtools/vendor/bin/apigen -c build/config/apigen.neon -d build/api -s src -s vendor/symfony/config -s vendor/symfony/console -s vendor/symfony/yaml -s vendor/guzzle/guzzle/src -s vendor/psr/log --report build/logs/checkstyle-apigen.xml --exclude *Test.php --exclude */Tests/* --google-analytics UA-40398434-1"
- ]
- },
- "config": {
- "process-timeout": 0
- }
-}
diff --git a/vendor/php-coveralls/php-coveralls/devtools/composer.json b/vendor/php-coveralls/php-coveralls/devtools/composer.json
deleted file mode 100644
index 07f428bf711..00000000000
--- a/vendor/php-coveralls/php-coveralls/devtools/composer.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "require": {
- "php": "^5.3.6 || ^7.0",
- "ext-json": "*",
- "ext-simplexml": "*",
- "apigen/apigen": "^2.8",
- "friendsofphp/php-cs-fixer": "~2.1.0",
- "pdepend/pdepend": "^2.2",
- "phpmd/phpmd": "^2.3",
- "sebastian/finder-facade": "^1.1",
- "sebastian/phpcpd": "^1.4",
- "squizlabs/php_codesniffer": "^1.4",
- "theseer/fdomdocument": "^1.6"
- }
-}
diff --git a/vendor/php-coveralls/php-coveralls/phpunit.xml.dist b/vendor/php-coveralls/php-coveralls/phpunit.xml.dist
deleted file mode 100644
index 45b0f7448e8..00000000000
--- a/vendor/php-coveralls/php-coveralls/phpunit.xml.dist
+++ /dev/null
@@ -1,39 +0,0 @@
-
-
-
-
-
-
-
-
-
- ./tests/
-
-
-
-
-
- ./src
-
- ./build
- ./composer
- ./tests
- ./vendor
-
-
-
-
-
-
-
-
-
diff --git a/vendor/php-coveralls/php-coveralls/src/Satooshi/Bundle/CoverallsBundle/Console/Application.php b/vendor/php-coveralls/php-coveralls/src/Satooshi/Bundle/CoverallsBundle/Console/Application.php
deleted file mode 100644
index 5e7b6e59e48..00000000000
--- a/vendor/php-coveralls/php-coveralls/src/Satooshi/Bundle/CoverallsBundle/Console/Application.php
+++ /dev/null
@@ -1,93 +0,0 @@
-
- */
-class Application extends BaseApplication
-{
- /**
- * Path to project root directory.
- *
- * @var string
- */
- private $rootDir;
-
- /**
- * Constructor.
- *
- * @param string $rootDir path to project root directory
- * @param string $name The name of the application
- * @param string $version The version of the application
- */
- public function __construct($rootDir, $name = 'UNKNOWN', $version = 'UNKNOWN')
- {
- $this->rootDir = $rootDir;
-
- parent::__construct($name, $version);
- }
-
- // internal method
-
- /**
- * {@inheritdoc}
- *
- * @see \Symfony\Component\Console\Application::getCommandName()
- */
- protected function getCommandName(InputInterface $input)
- {
- return 'coveralls:v1:jobs';
- }
-
- /**
- * {@inheritdoc}
- *
- * @see \Symfony\Component\Console\Application::getDefaultCommands()
- */
- protected function getDefaultCommands()
- {
- // Keep the core default commands to have the HelpCommand
- // which is used when using the --help option
- $defaultCommands = parent::getDefaultCommands();
-
- $defaultCommands[] = $this->createCoverallsV1JobsCommand();
-
- return $defaultCommands;
- }
-
- /**
- * Create CoverallsV1JobsCommand.
- *
- * @return \Satooshi\Bundle\CoverallsBundle\Console\CoverallsV1JobsCommand
- */
- protected function createCoverallsV1JobsCommand()
- {
- $command = new CoverallsV1JobsCommand();
- $command->setRootDir($this->rootDir);
-
- return $command;
- }
-
- // accessor
-
- /**
- * {@inheritdoc}
- *
- * @see \Symfony\Component\Console\Application::getDefinition()
- */
- public function getDefinition()
- {
- $inputDefinition = parent::getDefinition();
- // clear out the normal first argument, which is the command name
- $inputDefinition->setArguments();
-
- return $inputDefinition;
- }
-}
diff --git a/vendor/php-coveralls/php-coveralls/src/Satooshi/Bundle/CoverallsBundle/CoverallsBundle.php b/vendor/php-coveralls/php-coveralls/src/Satooshi/Bundle/CoverallsBundle/CoverallsBundle.php
deleted file mode 100644
index f73265391fc..00000000000
--- a/vendor/php-coveralls/php-coveralls/src/Satooshi/Bundle/CoverallsBundle/CoverallsBundle.php
+++ /dev/null
@@ -1,14 +0,0 @@
-
- */
-class CoverallsBundle extends Bundle
-{
-}
diff --git a/vendor/php-coveralls/php-coveralls/src/Satooshi/Bundle/CoverallsBundle/Entity/ArrayConvertable.php b/vendor/php-coveralls/php-coveralls/src/Satooshi/Bundle/CoverallsBundle/Entity/ArrayConvertable.php
deleted file mode 100644
index 33efcfbfe58..00000000000
--- a/vendor/php-coveralls/php-coveralls/src/Satooshi/Bundle/CoverallsBundle/Entity/ArrayConvertable.php
+++ /dev/null
@@ -1,18 +0,0 @@
-
- */
-interface ArrayConvertable
-{
- /**
- * Convert to an array.
- *
- * @return array
- */
- public function toArray();
-}
diff --git a/vendor/php-coveralls/php-coveralls/src/Satooshi/Bundle/CoverallsV1Bundle/Api/CoverallsApi.php b/vendor/php-coveralls/php-coveralls/src/Satooshi/Bundle/CoverallsV1Bundle/Api/CoverallsApi.php
deleted file mode 100644
index 7cb0b477d3f..00000000000
--- a/vendor/php-coveralls/php-coveralls/src/Satooshi/Bundle/CoverallsV1Bundle/Api/CoverallsApi.php
+++ /dev/null
@@ -1,76 +0,0 @@
-
- */
-abstract class CoverallsApi
-{
- /**
- * Configuration.
- *
- * @var Satooshi\Bundle\CoverallsV1Bundle\Config\Configuration
- */
- protected $config;
-
- /**
- * HTTP client.
- *
- * @var \Guzzle\Http\Client
- */
- protected $client;
-
- /**
- * Constructor.
- *
- * @param Configuration $config configuration
- * @param \Guzzle\Http\Client $client hTTP client
- */
- public function __construct(Configuration $config, Client $client = null)
- {
- $this->config = $config;
- $this->client = $client;
- }
-
- // accessor
-
- /**
- * Return configuration.
- *
- * @return \Satooshi\Bundle\CoverallsV1Bundle\Config\Configuration
- */
- public function getConfiguration()
- {
- return $this->config;
- }
-
- /**
- * Set HTTP client.
- *
- * @param \Guzzle\Http\Client $client hTTP client
- *
- * @return \Satooshi\Bundle\CoverallsV1Bundle\Api\CoverallsApi
- */
- public function setHttpClient(Client $client)
- {
- $this->client = $client;
-
- return $this;
- }
-
- /**
- * Return HTTP client.
- *
- * @return \Guzzle\Http\Client
- */
- public function getHttpClient()
- {
- return $this->client;
- }
-}
diff --git a/vendor/php-coveralls/php-coveralls/src/Satooshi/Bundle/CoverallsV1Bundle/Api/Jobs.php b/vendor/php-coveralls/php-coveralls/src/Satooshi/Bundle/CoverallsV1Bundle/Api/Jobs.php
deleted file mode 100644
index 508f3be2b7f..00000000000
--- a/vendor/php-coveralls/php-coveralls/src/Satooshi/Bundle/CoverallsV1Bundle/Api/Jobs.php
+++ /dev/null
@@ -1,189 +0,0 @@
-
- */
-class Jobs extends CoverallsApi
-{
- /**
- * URL for jobs API.
- *
- * @var string
- */
- const URL = 'https://coveralls.io/api/v1/jobs';
-
- /**
- * Filename as a POST parameter.
- *
- * @var string
- */
- const FILENAME = 'json_file';
-
- /**
- * JsonFile.
- *
- * @var Satooshi\Bundle\CoverallsV1Bundle\Entity\JsonFile
- */
- protected $jsonFile;
-
- // API
-
- /**
- * Collect clover XML into json_file.
- *
- * @return \Satooshi\Bundle\CoverallsV1Bundle\Api\Jobs
- */
- public function collectCloverXml()
- {
- $rootDir = $this->config->getRootDir();
- $cloverXmlPaths = $this->config->getCloverXmlPaths();
- $xmlCollector = new CloverXmlCoverageCollector();
-
- foreach ($cloverXmlPaths as $cloverXmlPath) {
- $xml = simplexml_load_file($cloverXmlPath);
-
- $xmlCollector->collect($xml, $rootDir);
- }
-
- $this->jsonFile = $xmlCollector->getJsonFile();
-
- if ($this->config->isExcludeNoStatements()) {
- $this->jsonFile->excludeNoStatementsFiles();
- }
-
- $this->jsonFile->sortSourceFiles();
-
- return $this;
- }
-
- /**
- * Collect git repository info into json_file.
- *
- * @return \Satooshi\Bundle\CoverallsV1Bundle\Api\Jobs
- */
- public function collectGitInfo()
- {
- $command = new GitCommand();
- $gitCollector = new GitInfoCollector($command);
-
- $this->jsonFile->setGit($gitCollector->collect());
-
- return $this;
- }
-
- /**
- * Collect environment variables.
- *
- * @param array $env $_SERVER environment
- *
- * @throws \Satooshi\Bundle\CoverallsV1Bundle\Entity\Exception\RequirementsNotSatisfiedException
- *
- * @return \Satooshi\Bundle\CoverallsV1Bundle\Api\Jobs
- */
- public function collectEnvVars(array $env)
- {
- $envCollector = new CiEnvVarsCollector($this->config);
-
- try {
- $this->jsonFile->fillJobs($envCollector->collect($env));
- } catch (\Satooshi\Bundle\CoverallsV1Bundle\Entity\Exception\RequirementsNotSatisfiedException $e) {
- $e->setReadEnv($envCollector->getReadEnv());
-
- throw $e;
- }
-
- return $this;
- }
-
- /**
- * Dump uploading json file.
- *
- * @return \Satooshi\Bundle\CoverallsV1Bundle\Api\Jobs
- */
- public function dumpJsonFile()
- {
- $jsonPath = $this->config->getJsonPath();
-
- file_put_contents($jsonPath, $this->jsonFile);
-
- return $this;
- }
-
- /**
- * Send json_file to jobs API.
- *
- * @throws \RuntimeException
- *
- * @return \Guzzle\Http\Message\Response|null
- */
- public function send()
- {
- if ($this->config->isDryRun()) {
- return;
- }
-
- $jsonPath = $this->config->getJsonPath();
-
- return $this->upload(static::URL, $jsonPath, static::FILENAME);
- }
-
- // internal method
-
- /**
- * Upload a file.
- *
- * @param string $url uRL to upload
- * @param string $path file path
- * @param string $filename filename
- *
- * @throws \RuntimeException
- *
- * @return \Guzzle\Http\Message\Response response
- */
- protected function upload($url, $path, $filename)
- {
- $request = $this->client->post($url)->addPostFiles(array($filename => $path));
-
- return $request->send();
- }
-
- // accessor
-
- /**
- * Set JsonFile.
- *
- * @param JsonFile $jsonFile json_file content
- *
- * @return \Satooshi\Bundle\CoverallsV1Bundle\Api\Jobs
- */
- public function setJsonFile(JsonFile $jsonFile)
- {
- $this->jsonFile = $jsonFile;
-
- return $this;
- }
-
- /**
- * Return JsonFile.
- *
- * @return JsonFile
- */
- public function getJsonFile()
- {
- if (isset($this->jsonFile)) {
- return $this->jsonFile;
- }
-
- return;
- }
-}
diff --git a/vendor/php-coveralls/php-coveralls/src/Satooshi/Bundle/CoverallsV1Bundle/Collector/CiEnvVarsCollector.php b/vendor/php-coveralls/php-coveralls/src/Satooshi/Bundle/CoverallsV1Bundle/Collector/CiEnvVarsCollector.php
deleted file mode 100644
index 1e26d9998c7..00000000000
--- a/vendor/php-coveralls/php-coveralls/src/Satooshi/Bundle/CoverallsV1Bundle/Collector/CiEnvVarsCollector.php
+++ /dev/null
@@ -1,199 +0,0 @@
-
- */
-class CiEnvVarsCollector
-{
- /**
- * Configuration.
- *
- * @var Satooshi\Bundle\CoverallsV1Bundle\Config\Configuration
- */
- protected $config;
-
- /**
- * Environment variables.
- *
- * Overwritten through collection process.
- *
- * @var array
- */
- protected $env;
-
- /**
- * Read environment variables.
- *
- * @var array
- */
- protected $readEnv;
-
- /**
- * Constructor.
- *
- * @param Configuration $config configuration
- */
- public function __construct(Configuration $config)
- {
- $this->config = $config;
- }
-
- // API
-
- /**
- * Collect environment variables.
- *
- * @param array $env $_SERVER environment
- *
- * @return array
- */
- public function collect(array $env)
- {
- $this->env = $env;
- $this->readEnv = array();
-
- $this->fillTravisCi()
- ->fillCircleCi()
- ->fillJenkins()
- ->fillLocal()
- ->fillRepoToken();
-
- return $this->env;
- }
-
- // internal method
-
- /**
- * Fill Travis CI environment variables.
- *
- * "TRAVIS", "TRAVIS_JOB_ID" must be set.
- *
- * @return \Satooshi\Bundle\CoverallsV1Bundle\Collector\CiEnvVarsCollector
- */
- protected function fillTravisCi()
- {
- if (isset($this->env['TRAVIS']) && $this->env['TRAVIS'] && isset($this->env['TRAVIS_JOB_ID'])) {
- $this->env['CI_JOB_ID'] = $this->env['TRAVIS_JOB_ID'];
-
- if ($this->config->hasServiceName()) {
- $this->env['CI_NAME'] = $this->config->getServiceName();
- } else {
- $this->env['CI_NAME'] = 'travis-ci';
- }
-
- // backup
- $this->readEnv['TRAVIS'] = $this->env['TRAVIS'];
- $this->readEnv['TRAVIS_JOB_ID'] = $this->env['TRAVIS_JOB_ID'];
- $this->readEnv['CI_NAME'] = $this->env['CI_NAME'];
- }
-
- return $this;
- }
-
- /**
- * Fill CircleCI environment variables.
- *
- * "CIRCLECI", "CIRCLE_BUILD_NUM" must be set.
- *
- * @return \Satooshi\Bundle\CoverallsV1Bundle\Collector\CiEnvVarsCollector
- */
- protected function fillCircleCi()
- {
- if (isset($this->env['CIRCLECI']) && $this->env['CIRCLECI'] && isset($this->env['CIRCLE_BUILD_NUM'])) {
- $this->env['CI_BUILD_NUMBER'] = $this->env['CIRCLE_BUILD_NUM'];
- $this->env['CI_NAME'] = 'circleci';
-
- // backup
- $this->readEnv['CIRCLECI'] = $this->env['CIRCLECI'];
- $this->readEnv['CIRCLE_BUILD_NUM'] = $this->env['CIRCLE_BUILD_NUM'];
- $this->readEnv['CI_NAME'] = $this->env['CI_NAME'];
- }
-
- return $this;
- }
-
- /**
- * Fill Jenkins environment variables.
- *
- * "JENKINS_URL", "BUILD_NUMBER" must be set.
- *
- * @return \Satooshi\Bundle\CoverallsV1Bundle\Collector\CiEnvVarsCollector
- */
- protected function fillJenkins()
- {
- if (isset($this->env['JENKINS_URL']) && isset($this->env['BUILD_NUMBER'])) {
- $this->env['CI_BUILD_NUMBER'] = $this->env['BUILD_NUMBER'];
- $this->env['CI_BUILD_URL'] = $this->env['JENKINS_URL'];
- $this->env['CI_NAME'] = 'jenkins';
-
- // backup
- $this->readEnv['BUILD_NUMBER'] = $this->env['BUILD_NUMBER'];
- $this->readEnv['JENKINS_URL'] = $this->env['JENKINS_URL'];
- $this->readEnv['CI_NAME'] = $this->env['CI_NAME'];
- }
-
- return $this;
- }
-
- /**
- * Fill local environment variables.
- *
- * "COVERALLS_RUN_LOCALLY" must be set.
- *
- * @return \Satooshi\Bundle\CoverallsV1Bundle\Collector\CiEnvVarsCollector
- */
- protected function fillLocal()
- {
- if (isset($this->env['COVERALLS_RUN_LOCALLY']) && $this->env['COVERALLS_RUN_LOCALLY']) {
- $this->env['CI_JOB_ID'] = null;
- $this->env['CI_NAME'] = 'php-coveralls';
- $this->env['COVERALLS_EVENT_TYPE'] = 'manual';
-
- // backup
- $this->readEnv['COVERALLS_RUN_LOCALLY'] = $this->env['COVERALLS_RUN_LOCALLY'];
- $this->readEnv['COVERALLS_EVENT_TYPE'] = $this->env['COVERALLS_EVENT_TYPE'];
- $this->readEnv['CI_NAME'] = $this->env['CI_NAME'];
- }
-
- return $this;
- }
-
- /**
- * Fill repo_token for unsupported CI service.
- *
- * "COVERALLS_REPO_TOKEN" must be set.
- *
- * @return \Satooshi\Bundle\CoverallsV1Bundle\Collector\CiEnvVarsCollector
- */
- protected function fillRepoToken()
- {
- if ($this->config->hasRepoToken()) {
- $this->env['COVERALLS_REPO_TOKEN'] = $this->config->getRepoToken();
- }
-
- // backup
- if (isset($this->env['COVERALLS_REPO_TOKEN'])) {
- $this->readEnv['COVERALLS_REPO_TOKEN'] = $this->env['COVERALLS_REPO_TOKEN'];
- }
-
- return $this;
- }
-
- // accessor
-
- /**
- * Return read environment variables.
- *
- * @return array
- */
- public function getReadEnv()
- {
- return $this->readEnv;
- }
-}
diff --git a/vendor/php-coveralls/php-coveralls/src/Satooshi/Bundle/CoverallsV1Bundle/Collector/CloverXmlCoverageCollector.php b/vendor/php-coveralls/php-coveralls/src/Satooshi/Bundle/CoverallsV1Bundle/Collector/CloverXmlCoverageCollector.php
deleted file mode 100644
index c454c949418..00000000000
--- a/vendor/php-coveralls/php-coveralls/src/Satooshi/Bundle/CoverallsV1Bundle/Collector/CloverXmlCoverageCollector.php
+++ /dev/null
@@ -1,146 +0,0 @@
-
- */
-class CloverXmlCoverageCollector
-{
- /**
- * JsonFile.
- *
- * @var \Satooshi\Bundle\CoverallsV1Bundle\Entity\JsonFile
- */
- protected $jsonFile;
-
- // API
-
- /**
- * Collect coverage from XML object.
- *
- * @param \SimpleXMLElement $xml clover XML object
- * @param string $rootDir path to repository root directory
- *
- * @return \Satooshi\Bundle\CoverallsV1Bundle\Entity\JsonFile
- */
- public function collect(\SimpleXMLElement $xml, $rootDir)
- {
- $root = rtrim($rootDir, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR;
-
- if (!isset($this->jsonFile)) {
- $this->jsonFile = new JsonFile();
- }
-
- // overwrite if run_at has already been set
- $runAt = $this->collectRunAt($xml);
- $this->jsonFile->setRunAt($runAt);
-
- $xpaths = array(
- '/coverage/project/file',
- '/coverage/project/package/file',
- );
-
- foreach ($xpaths as $xpath) {
- foreach ($xml->xpath($xpath) as $file) {
- $srcFile = $this->collectFileCoverage($file, $root);
-
- if ($srcFile !== null) {
- $this->jsonFile->addSourceFile($srcFile);
- }
- }
- }
-
- return $this->jsonFile;
- }
-
- // Internal method
-
- /**
- * Collect timestamp when the job ran.
- *
- * @param \SimpleXMLElement $xml clover XML object of a file
- * @param string $format dateTime format
- *
- * @return string
- */
- protected function collectRunAt(\SimpleXMLElement $xml, $format = 'Y-m-d H:i:s O')
- {
- $timestamp = $xml->project['timestamp'];
- $runAt = new \DateTime('@' . $timestamp);
-
- return $runAt->format($format);
- }
-
- /**
- * Collect coverage data of a file.
- *
- * @param \SimpleXMLElement $file clover XML object of a file
- * @param string $root path to src directory
- *
- * @return null|\Satooshi\Bundle\CoverallsV1Bundle\Entity\SourceFile
- */
- protected function collectFileCoverage(\SimpleXMLElement $file, $root)
- {
- $absolutePath = realpath((string) ($file['path'] ?: $file['name']));
-
- if (false === strpos($absolutePath, $root)) {
- return;
- }
-
- if ($root !== DIRECTORY_SEPARATOR) {
- $filename = str_replace($root, '', $absolutePath);
- } else {
- $filename = $absolutePath;
- }
-
- return $this->collectCoverage($file, $absolutePath, $filename);
- }
-
- /**
- * Collect coverage data.
- *
- * @param \SimpleXMLElement $file clover XML object of a file
- * @param string $path path to source file
- * @param string $filename filename
- *
- * @return \Satooshi\Bundle\CoverallsV1Bundle\Entity\SourceFile
- */
- protected function collectCoverage(\SimpleXMLElement $file, $path, $filename)
- {
- if ($this->jsonFile->hasSourceFile($path)) {
- $srcFile = $this->jsonFile->getSourceFile($path);
- } else {
- $srcFile = new SourceFile($path, $filename);
- }
-
- foreach ($file->line as $line) {
- if ((string) $line['type'] === 'stmt') {
- $lineNum = (int) $line['num'];
-
- if ($lineNum > 0) {
- $srcFile->addCoverage($lineNum - 1, (int) $line['count']);
- }
- }
- }
-
- return $srcFile;
- }
-
- // accessor
-
- /**
- * Return json file.
- *
- * @return \Satooshi\Bundle\CoverallsV1Bundle\Entity\JsonFile
- */
- public function getJsonFile()
- {
- return $this->jsonFile;
- }
-}
diff --git a/vendor/php-coveralls/php-coveralls/src/Satooshi/Bundle/CoverallsV1Bundle/Collector/GitInfoCollector.php b/vendor/php-coveralls/php-coveralls/src/Satooshi/Bundle/CoverallsV1Bundle/Collector/GitInfoCollector.php
deleted file mode 100644
index 7d20050f7a7..00000000000
--- a/vendor/php-coveralls/php-coveralls/src/Satooshi/Bundle/CoverallsV1Bundle/Collector/GitInfoCollector.php
+++ /dev/null
@@ -1,155 +0,0 @@
-
- */
-class GitInfoCollector
-{
- /**
- * Git command.
- *
- * @var GitCommand
- */
- protected $command;
-
- /**
- * Constructor.
- *
- * @param GitCommand $command Git command
- */
- public function __construct(GitCommand $command)
- {
- $this->command = $command;
- }
-
- // API
-
- /**
- * Collect git repository info.
- *
- * @return \Satooshi\Bundle\CoverallsV1Bundle\Entity\Git\Git
- */
- public function collect()
- {
- $branch = $this->collectBranch();
- $commit = $this->collectCommit();
- $remotes = $this->collectRemotes();
-
- return new Git($branch, $commit, $remotes);
- }
-
- // internal method
-
- /**
- * Collect branch name.
- *
- * @throws \RuntimeException
- *
- * @return string
- */
- protected function collectBranch()
- {
- $branchesResult = $this->command->getBranches();
-
- foreach ($branchesResult as $result) {
- if (strpos($result, '* ') === 0) {
- $exploded = explode('* ', $result, 2);
-
- return $exploded[1];
- }
- }
-
- throw new \RuntimeException();
- }
-
- /**
- * Collect commit info.
- *
- * @throws \RuntimeException
- *
- * @return \Satooshi\Bundle\CoverallsV1Bundle\Entity\Git\Commit
- */
- protected function collectCommit()
- {
- $commitResult = $this->command->getHeadCommit();
-
- if (count($commitResult) !== 6 || array_keys($commitResult) !== range(0, 5)) {
- throw new \RuntimeException();
- }
-
- $commit = new Commit();
-
- return $commit
- ->setId($commitResult[0])
- ->setAuthorName($commitResult[1])
- ->setAuthorEmail($commitResult[2])
- ->setCommitterName($commitResult[3])
- ->setCommitterEmail($commitResult[4])
- ->setMessage($commitResult[5]);
- }
-
- /**
- * Collect remotes info.
- *
- * @throws \RuntimeException
- *
- * @return \Satooshi\Bundle\CoverallsV1Bundle\Entity\Git\Remote[]
- */
- protected function collectRemotes()
- {
- $remotesResult = $this->command->getRemotes();
-
- if (count($remotesResult) === 0) {
- throw new \RuntimeException();
- }
-
- // parse command result
- $results = array();
-
- foreach ($remotesResult as $result) {
- if (strpos($result, ' ') !== false) {
- list($remote) = explode(' ', $result, 2);
-
- $results[] = $remote;
- }
- }
-
- // filter
- $results = array_unique($results);
-
- // create Remote instances
- $remotes = array();
-
- foreach ($results as $result) {
- if (strpos($result, "\t") !== false) {
- list($name, $url) = explode("\t", $result, 2);
-
- $remote = new Remote();
- $remotes[] = $remote->setName($name)->setUrl($url);
- }
- }
-
- return $remotes;
- }
-
- // accessor
-
- /**
- * Return git command.
- *
- * @return \Satooshi\Component\System\Git\GitCommand
- */
- public function getCommand()
- {
- return $this->command;
- }
-}
diff --git a/vendor/php-coveralls/php-coveralls/src/Satooshi/Bundle/CoverallsV1Bundle/Command/CoverallsV1JobsCommand.php b/vendor/php-coveralls/php-coveralls/src/Satooshi/Bundle/CoverallsV1Bundle/Command/CoverallsV1JobsCommand.php
deleted file mode 100644
index 5f00f71947c..00000000000
--- a/vendor/php-coveralls/php-coveralls/src/Satooshi/Bundle/CoverallsV1Bundle/Command/CoverallsV1JobsCommand.php
+++ /dev/null
@@ -1,182 +0,0 @@
-
- */
-class CoverallsV1JobsCommand extends Command
-{
- /**
- * Path to project root directory.
- *
- * @var string
- */
- protected $rootDir;
-
- /**
- * Logger.
- *
- * @var \Psr\Log\LoggerInterface
- */
- protected $logger;
-
- // internal method
-
- /**
- * {@inheritdoc}
- *
- * @see \Symfony\Component\Console\Command\Command::configure()
- */
- protected function configure()
- {
- $this
- ->setName('coveralls:v1:jobs')
- ->setDescription('Coveralls Jobs API v1')
- ->addOption(
- 'config',
- '-c',
- InputOption::VALUE_OPTIONAL,
- '.coveralls.yml path',
- '.coveralls.yml'
- )
- ->addOption(
- 'dry-run',
- null,
- InputOption::VALUE_NONE,
- 'Do not send json_file to Jobs API'
- )
- ->addOption(
- 'exclude-no-stmt',
- null,
- InputOption::VALUE_NONE,
- 'Exclude source files that have no executable statements'
- )
- ->addOption(
- 'env',
- '-e',
- InputOption::VALUE_OPTIONAL,
- 'Runtime environment name: test, dev, prod',
- 'prod'
- )
- ->addOption(
- 'coverage_clover',
- '-x',
- InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY,
- 'Coverage clover xml files (allowing multiple values).',
- array()
- )
- ->addOption(
- 'json_path',
- '-o',
- InputOption::VALUE_REQUIRED,
- 'Coveralls output json file',
- array()
- )
- ->addOption(
- 'root_dir',
- '-r',
- InputOption::VALUE_OPTIONAL,
- 'Root directory of the project.',
- '.'
- );
- }
-
- /**
- * {@inheritdoc}
- *
- * @see \Symfony\Component\Console\Command\Command::execute()
- */
- protected function execute(InputInterface $input, OutputInterface $output)
- {
- $stopwatch = new Stopwatch();
- $stopwatch->start(__CLASS__);
- $file = new Path();
- if ($input->getOption('root_dir') !== '.') {
- $this->rootDir = $file->toAbsolutePath(
- $input->getOption('root_dir'),
- $this->rootDir
- );
- }
-
- $config = $this->loadConfiguration($input, $this->rootDir);
- $this->logger = $config->isVerbose() && !$config->isTestEnv() ? new ConsoleLogger($output) : new NullLogger();
-
- $this->executeApi($config);
-
- $event = $stopwatch->stop(__CLASS__);
- $time = number_format($event->getDuration() / 1000, 3); // sec
- $mem = number_format($event->getMemory() / (1024 * 1024), 2); // MB
- $this->logger->info(sprintf('elapsed time: %s sec memory: %s MB', $time, $mem));
-
- return 0;
- }
-
- // for Jobs API
-
- /**
- * Load configuration.
- *
- * @param InputInterface $input input arguments
- * @param string $rootDir path to project root directory
- *
- * @return \Satooshi\Bundle\CoverallsV1Bundle\Config\Configuration
- */
- protected function loadConfiguration(InputInterface $input, $rootDir)
- {
- $coverallsYmlPath = $input->getOption('config');
-
- $ymlPath = $this->rootDir . DIRECTORY_SEPARATOR . $coverallsYmlPath;
- $configurator = new Configurator();
-
- return $configurator
- ->load($ymlPath, $rootDir, $input)
- ->setDryRun($input->getOption('dry-run'))
- ->setExcludeNoStatementsUnlessFalse($input->getOption('exclude-no-stmt'))
- ->setVerbose($input->getOption('verbose'))
- ->setEnv($input->getOption('env'));
- }
-
- /**
- * Execute Jobs API.
- *
- * @param Configuration $config configuration
- */
- protected function executeApi(Configuration $config)
- {
- $client = new Client();
- $api = new Jobs($config, $client);
- $repository = new JobsRepository($api, $config);
-
- $repository->setLogger($this->logger);
- $repository->persist();
- }
-
- // accessor
-
- /**
- * Set root directory.
- *
- * @param string $rootDir path to project root directory
- */
- public function setRootDir($rootDir)
- {
- $this->rootDir = $rootDir;
- }
-}
diff --git a/vendor/php-coveralls/php-coveralls/src/Satooshi/Bundle/CoverallsV1Bundle/Config/Configuration.php b/vendor/php-coveralls/php-coveralls/src/Satooshi/Bundle/CoverallsV1Bundle/Config/Configuration.php
deleted file mode 100644
index 669da199679..00000000000
--- a/vendor/php-coveralls/php-coveralls/src/Satooshi/Bundle/CoverallsV1Bundle/Config/Configuration.php
+++ /dev/null
@@ -1,366 +0,0 @@
-
- */
-class Configuration
-{
- // same as ruby lib
-
- /**
- * repo_token.
- *
- * @var string
- */
- protected $repoToken;
-
- /**
- * service_name.
- *
- * @var string
- */
- protected $serviceName;
-
- // only for php lib
-
- /**
- * Absolute path to repository root directory.
- *
- * @var string
- */
- protected $rootDir;
-
- /**
- * Absolute paths to clover.xml.
- *
- * @var array
- */
- protected $cloverXmlPaths = array();
-
- /**
- * Absolute path to output json_file.
- *
- * @var string
- */
- protected $jsonPath;
-
- // from command option
-
- /**
- * Whether to send json_file to jobs API.
- *
- * @var bool
- */
- protected $dryRun = true;
-
- /**
- * Whether to exclude source files that have no executable statements.
- *
- * @var bool
- */
- protected $excludeNoStatements = false;
-
- /**
- * Whether to show log.
- *
- * @var bool
- */
- protected $verbose = false;
-
- /**
- * Runtime environment name.
- *
- * @var string
- */
- protected $env = 'prod';
-
- // accessor
-
- /**
- * Set repository token.
- *
- * @param string $repoToken
- *
- * @return \Satooshi\Bundle\CoverallsV1Bundle\Config\Configuration
- */
- public function setRepoToken($repoToken)
- {
- $this->repoToken = $repoToken;
-
- return $this;
- }
-
- /**
- * Return whether repository token is configured.
- *
- * @return bool
- */
- public function hasRepoToken()
- {
- return isset($this->repoToken);
- }
-
- /**
- * Return repository token.
- *
- * @return string|null
- */
- public function getRepoToken()
- {
- return $this->repoToken;
- }
-
- /**
- * Set service name.
- *
- * @param string $serviceName
- *
- * @return \Satooshi\Bundle\CoverallsV1Bundle\Config\Configuration
- */
- public function setServiceName($serviceName)
- {
- $this->serviceName = $serviceName;
-
- return $this;
- }
-
- /**
- * Return whether the service name is configured.
- *
- * @return bool
- */
- public function hasServiceName()
- {
- return isset($this->serviceName);
- }
-
- /**
- * Return service name.
- *
- * @return string|null
- */
- public function getServiceName()
- {
- return $this->serviceName;
- }
-
- public function setRootDir($rootDir)
- {
- $this->rootDir = $rootDir;
-
- return $this;
- }
-
- public function getRootDir()
- {
- return $this->rootDir;
- }
-
- /**
- * Set absolute paths to clover.xml.
- *
- * @param string[] $cloverXmlPaths
- *
- * @return \Satooshi\Bundle\CoverallsV1Bundle\Config\Configuration
- */
- public function setCloverXmlPaths(array $cloverXmlPaths)
- {
- $this->cloverXmlPaths = $cloverXmlPaths;
-
- return $this;
- }
-
- /**
- * Add absolute path to clover.xml.
- *
- * @param string $cloverXmlPath
- *
- * @return \Satooshi\Bundle\CoverallsV1Bundle\Config\Configuration
- */
- public function addCloverXmlPath($cloverXmlPath)
- {
- $this->cloverXmlPaths[] = $cloverXmlPath;
-
- return $this;
- }
-
- /**
- * Return absolute path to clover.xml.
- *
- * @return string[]
- */
- public function getCloverXmlPaths()
- {
- return $this->cloverXmlPaths;
- }
-
- /**
- * Set absolute path to output json_file.
- *
- * @param string $jsonPath
- *
- * @return \Satooshi\Bundle\CoverallsV1Bundle\Config\Configuration
- */
- public function setJsonPath($jsonPath)
- {
- $this->jsonPath = $jsonPath;
-
- return $this;
- }
-
- /**
- * Return absolute path to output json_file.
- *
- * @return string
- */
- public function getJsonPath()
- {
- return $this->jsonPath;
- }
-
- /**
- * Set whether to send json_file to jobs API.
- *
- * @param bool $dryRun
- *
- * @return \Satooshi\Bundle\CoverallsV1Bundle\Config\Configuration
- */
- public function setDryRun($dryRun)
- {
- $this->dryRun = $dryRun;
-
- return $this;
- }
-
- /**
- * Return whether to send json_file to jobs API.
- *
- * @return bool
- */
- public function isDryRun()
- {
- return $this->dryRun;
- }
-
- /**
- * Set whether to exclude source files that have no executable statements.
- *
- * @param bool $excludeNoStatements
- *
- * @return \Satooshi\Bundle\CoverallsV1Bundle\Config\Configuration
- */
- public function setExcludeNoStatements($excludeNoStatements)
- {
- $this->excludeNoStatements = $excludeNoStatements;
-
- return $this;
- }
-
- /**
- * Set whether to exclude source files that have no executable statements unless false.
- *
- * @param bool $excludeNoStatements
- *
- * @return \Satooshi\Bundle\CoverallsV1Bundle\Config\Configuration
- */
- public function setExcludeNoStatementsUnlessFalse($excludeNoStatements)
- {
- if ($excludeNoStatements) {
- $this->excludeNoStatements = true;
- }
-
- return $this;
- }
-
- /**
- * Return whether to exclude source files that have no executable statements.
- *
- * @return bool
- */
- public function isExcludeNoStatements()
- {
- return $this->excludeNoStatements;
- }
-
- /**
- * Set whether to show log.
- *
- * @param bool $verbose
- *
- * @return \Satooshi\Bundle\CoverallsV1Bundle\Config\Configuration
- */
- public function setVerbose($verbose)
- {
- $this->verbose = $verbose;
-
- return $this;
- }
-
- /**
- * Return whether to show log.
- *
- * @return bool
- */
- public function isVerbose()
- {
- return $this->verbose;
- }
-
- /**
- * Set runtime environment name.
- *
- * @param string $env runtime environment name
- *
- * @return \Satooshi\Bundle\CoverallsV1Bundle\Config\Configuration
- */
- public function setEnv($env)
- {
- $this->env = $env;
-
- return $this;
- }
-
- /**
- * Return runtime environment name.
- *
- * @return string
- */
- public function getEnv()
- {
- return $this->env;
- }
-
- /**
- * Return whether the runtime environment is test.
- *
- * @return bool
- */
- public function isTestEnv()
- {
- return $this->env === 'test';
- }
-
- /**
- * Return whether the runtime environment is dev.
- *
- * @return bool
- */
- public function isDevEnv()
- {
- return $this->env === 'dev';
- }
-
- /**
- * Return whether the runtime environment is prod.
- *
- * @return bool
- */
- public function isProdEnv()
- {
- return $this->env === 'prod';
- }
-}
diff --git a/vendor/php-coveralls/php-coveralls/src/Satooshi/Bundle/CoverallsV1Bundle/Config/Configurator.php b/vendor/php-coveralls/php-coveralls/src/Satooshi/Bundle/CoverallsV1Bundle/Config/Configurator.php
deleted file mode 100644
index d0dda4bb6de..00000000000
--- a/vendor/php-coveralls/php-coveralls/src/Satooshi/Bundle/CoverallsV1Bundle/Config/Configurator.php
+++ /dev/null
@@ -1,248 +0,0 @@
-
- */
-class Configurator
-{
- // API
-
- /**
- * Load configuration.
- *
- * @param string $coverallsYmlPath Path to .coveralls.yml.
- * @param string $rootDir path to project root directory
- * @param InputInterface $input|null Input arguments
- *
- * @throws \Symfony\Component\Yaml\Exception\ParseException If the YAML is not valid
- *
- * @return \Satooshi\Bundle\CoverallsV1Bundle\Config\Configuration
- */
- public function load($coverallsYmlPath, $rootDir, InputInterface $input = null)
- {
- $yml = $this->parse($coverallsYmlPath);
- $options = $this->process($yml);
-
- return $this->createConfiguration($options, $rootDir, $input);
- }
-
- // Internal method
-
- /**
- * Parse .coveralls.yml.
- *
- * @param string $coverallsYmlPath Path to .coveralls.yml.
- *
- * @throws \Symfony\Component\Yaml\Exception\ParseException If the YAML is not valid
- *
- * @return array
- */
- protected function parse($coverallsYmlPath)
- {
- $file = new Path();
- $path = realpath($coverallsYmlPath);
-
- if ($file->isRealFileReadable($path)) {
- $parser = new Parser();
- $yml = $parser->parse(file_get_contents($path));
-
- return empty($yml) ? array() : $yml;
- }
-
- return array();
- }
-
- /**
- * Process parsed configuration according to the configuration definition.
- *
- * @param array $yml parsed configuration
- *
- * @return array
- */
- protected function process(array $yml)
- {
- $processor = new Processor();
- $configuration = new CoverallsConfiguration();
-
- return $processor->processConfiguration($configuration, array('coveralls' => $yml));
- }
-
- /**
- * Create coveralls configuration.
- *
- * @param array $options processed configuration
- * @param string $rootDir path to project root directory
- * @param InputInterface $input|null Input arguments
- *
- * @return \Satooshi\Bundle\CoverallsV1Bundle\Config\Configuration
- */
- protected function createConfiguration(array $options, $rootDir, InputInterface $input = null)
- {
- $configuration = new Configuration();
- $file = new Path();
-
- $repoToken = $options['repo_token'];
- $repoSecretToken = $options['repo_secret_token'];
-
- // handle coverage clover
- $coverage_clover = $options['coverage_clover'];
- if ($input !== null && $input->hasOption('coverage_clover')) {
- $option = $input->getOption('coverage_clover');
- if (!empty($option)) {
- $coverage_clover = $option;
- }
- }
-
- // handle output json path
- $json_path = $options['json_path'];
- if ($input !== null && $input->hasOption('json_path')) {
- $option = $input->getOption('json_path');
- if (!empty($option)) {
- $json_path = $option;
- }
- }
-
- return $configuration
- ->setRepoToken($repoToken !== null ? $repoToken : $repoSecretToken)
- ->setServiceName($options['service_name'])
- ->setRootDir($rootDir)
- ->setCloverXmlPaths($this->ensureCloverXmlPaths($coverage_clover, $rootDir, $file))
- ->setJsonPath($this->ensureJsonPath($json_path, $rootDir, $file))
- ->setExcludeNoStatements($options['exclude_no_stmt']);
- }
-
- /**
- * Ensure coverage_clover is valid.
- *
- * @param string $option coverage_clover option
- * @param string $rootDir path to project root directory
- * @param Path $file path object
- *
- * @throws \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException
- *
- * @return array valid Absolute pathes of coverage_clover
- */
- protected function ensureCloverXmlPaths($option, $rootDir, Path $file)
- {
- if (is_array($option)) {
- return $this->getGlobPathsFromArrayOption($option, $rootDir, $file);
- }
-
- return $this->getGlobPathsFromStringOption($option, $rootDir, $file);
- }
-
- /**
- * Return absolute paths from glob path.
- *
- * @param string $path absolute path
- *
- * @throws \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException
- *
- * @return array absolute paths
- */
- protected function getGlobPaths($path)
- {
- $paths = array();
- $iterator = new \GlobIterator($path);
-
- foreach ($iterator as $fileInfo) {
- /* @var $fileInfo \SplFileInfo */
- $paths[] = $fileInfo->getPathname();
- }
-
- // validate
- if (count($paths) === 0) {
- throw new InvalidConfigurationException('coverage_clover XML file is not readable');
- }
-
- return $paths;
- }
-
- /**
- * Return absolute paths from string option value.
- *
- * @param string $option coverage_clover option value
- * @param string $rootDir path to project root directory
- * @param Path $file path object
- *
- * @throws \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException
- *
- * @return array absolute pathes
- */
- protected function getGlobPathsFromStringOption($option, $rootDir, Path $file)
- {
- if (!is_string($option)) {
- throw new InvalidConfigurationException('coverage_clover XML file is not readable');
- }
-
- // normalize
- $path = $file->toAbsolutePath($option, $rootDir);
-
- return $this->getGlobPaths($path);
- }
-
- /**
- * Return absolute paths from array option values.
- *
- * @param array $options coverage_clover option values
- * @param string $rootDir path to project root directory
- * @param Path $file path object
- *
- * @throws \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException
- *
- * @return array absolute pathes
- */
- protected function getGlobPathsFromArrayOption(array $options, $rootDir, Path $file)
- {
- $paths = array();
-
- foreach ($options as $option) {
- $paths = array_merge($paths, $this->getGlobPathsFromStringOption($option, $rootDir, $file));
- }
-
- return $paths;
- }
-
- /**
- * Ensure json_path is valid.
- *
- * @param string $option json_path option
- * @param string $rootDir path to project root directory
- * @param Path $file path object
- *
- * @throws \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException
- *
- * @return string valid json_path
- */
- protected function ensureJsonPath($option, $rootDir, Path $file)
- {
- // normalize
- $realpath = $file->getRealWritingFilePath($option, $rootDir);
-
- // validate file
- $realFilePath = $file->getRealPath($realpath, $rootDir);
-
- if ($realFilePath !== false && !$file->isRealFileWritable($realFilePath)) {
- throw new InvalidConfigurationException('json_path is not writable');
- }
-
- // validate parent dir
- $realDir = $file->getRealDir($realpath, $rootDir);
-
- if (!$file->isRealDirWritable($realDir)) {
- throw new InvalidConfigurationException('json_path is not writable');
- }
-
- return $realpath;
- }
-}
diff --git a/vendor/php-coveralls/php-coveralls/src/Satooshi/Bundle/CoverallsV1Bundle/Config/CoverallsConfiguration.php b/vendor/php-coveralls/php-coveralls/src/Satooshi/Bundle/CoverallsV1Bundle/Config/CoverallsConfiguration.php
deleted file mode 100644
index e70c374b48f..00000000000
--- a/vendor/php-coveralls/php-coveralls/src/Satooshi/Bundle/CoverallsV1Bundle/Config/CoverallsConfiguration.php
+++ /dev/null
@@ -1,62 +0,0 @@
-
- */
-class CoverallsConfiguration implements ConfigurationInterface
-{
- // ConfigurationInterface
-
- /**
- * {@inheritdoc}
- *
- * @see \Symfony\Component\Config\Definition\ConfigurationInterface::getConfigTreeBuilder()
- */
- public function getConfigTreeBuilder()
- {
- // define configuration
-
- $treeBuilder = new TreeBuilder();
- $rootNode = $treeBuilder->root('coveralls');
-
- $rootNode
- ->children()
- // same as ruby lib
- ->scalarNode('repo_token')
- ->defaultNull()
- ->end()
- ->scalarNode('repo_secret_token')
- ->defaultNull()
- ->end()
- ->scalarNode('service_name')
- ->defaultNull()
- ->end()
- ->variableNode('coverage_clover')
- ->defaultValue('build/logs/clover.xml')
- ->end()
- ->scalarNode('json_path')
- ->defaultValue('build/logs/coveralls-upload.json')
- ->end()
- ->booleanNode('exclude_no_stmt')
- ->defaultFalse()
- ->end()
- ->end();
-
- return $treeBuilder;
- }
-}
diff --git a/vendor/php-coveralls/php-coveralls/src/Satooshi/Bundle/CoverallsV1Bundle/CoverallsV1Bundle.php b/vendor/php-coveralls/php-coveralls/src/Satooshi/Bundle/CoverallsV1Bundle/CoverallsV1Bundle.php
deleted file mode 100644
index 559fa01818b..00000000000
--- a/vendor/php-coveralls/php-coveralls/src/Satooshi/Bundle/CoverallsV1Bundle/CoverallsV1Bundle.php
+++ /dev/null
@@ -1,14 +0,0 @@
-
- */
-class CoverallsV1Bundle extends Bundle
-{
-}
diff --git a/vendor/php-coveralls/php-coveralls/src/Satooshi/Bundle/CoverallsV1Bundle/Entity/Coveralls.php b/vendor/php-coveralls/php-coveralls/src/Satooshi/Bundle/CoverallsV1Bundle/Entity/Coveralls.php
deleted file mode 100644
index 7290efd137c..00000000000
--- a/vendor/php-coveralls/php-coveralls/src/Satooshi/Bundle/CoverallsV1Bundle/Entity/Coveralls.php
+++ /dev/null
@@ -1,23 +0,0 @@
-
- */
-abstract class Coveralls implements ArrayConvertable
-{
- /**
- * String expression (convert to json).
- *
- * @return string
- */
- public function __toString()
- {
- return json_encode($this->toArray());
- }
-}
diff --git a/vendor/php-coveralls/php-coveralls/src/Satooshi/Bundle/CoverallsV1Bundle/Entity/Exception/RequirementsNotSatisfiedException.php b/vendor/php-coveralls/php-coveralls/src/Satooshi/Bundle/CoverallsV1Bundle/Entity/Exception/RequirementsNotSatisfiedException.php
deleted file mode 100644
index 6e9cc8455b9..00000000000
--- a/vendor/php-coveralls/php-coveralls/src/Satooshi/Bundle/CoverallsV1Bundle/Entity/Exception/RequirementsNotSatisfiedException.php
+++ /dev/null
@@ -1,118 +0,0 @@
-
- */
-class RequirementsNotSatisfiedException extends \RuntimeException
-{
- /**
- * Error message.
- *
- * @var string
- */
- protected $message = 'Requirements are not satisfied.';
-
- /**
- * Read environment variables.
- *
- * @var array
- */
- protected $readEnv;
-
- /**
- * Array of secret env vars.
- *
- * @var string[]
- */
- private static $secretEnvVars = array(
- 'COVERALLS_REPO_TOKEN',
- );
-
- /**
- * Format a pair of the envVarName and the value.
- *
- * @param string $key the env var name
- * @param string $value the value of the env var
- *
- * @return string
- */
- protected function format($key, $value)
- {
- if (in_array($key, self::$secretEnvVars, true)
- && is_string($value)
- && strlen($value) > 0) {
- $value = '********(HIDDEN)';
- }
-
- return sprintf(" - %s=%s\n", $key, var_export($value, true));
- }
-
- /**
- * Return help message.
- *
- * @return string
- */
- public function getHelpMessage()
- {
- $message = $this->message . "\n";
-
- if (isset($this->readEnv) && is_array($this->readEnv)) {
- foreach ($this->readEnv as $envVarName => $value) {
- $message .= $this->format($envVarName, $value);
- }
- }
-
- $message .= <<< 'EOL'
-
-Set environment variables properly like the following.
-For Travis users:
-
- - TRAVIS
- - TRAVIS_JOB_ID
-
-For CircleCI users:
-
- - CIRCLECI
- - CIRCLE_BUILD_NUM
- - COVERALLS_REPO_TOKEN
-
-For Jenkins users:
-
- - JENKINS_URL
- - BUILD_NUMBER
- - COVERALLS_REPO_TOKEN
-
-From local environment:
-
- - COVERALLS_RUN_LOCALLY
- - COVERALLS_REPO_TOKEN
-
-EOL;
-
- return $message;
- }
-
- /**
- * Set read environment variables.
- *
- * @param array $readEnv read environment variables
- */
- public function setReadEnv(array $readEnv)
- {
- $this->readEnv = $readEnv;
- }
-
- /**
- * Return read environment variables.
- *
- * @return array
- */
- public function getReadEnv()
- {
- return $this->readEnv;
- }
-}
diff --git a/vendor/php-coveralls/php-coveralls/src/Satooshi/Bundle/CoverallsV1Bundle/Entity/Git/Commit.php b/vendor/php-coveralls/php-coveralls/src/Satooshi/Bundle/CoverallsV1Bundle/Entity/Git/Commit.php
deleted file mode 100644
index de710e6859f..00000000000
--- a/vendor/php-coveralls/php-coveralls/src/Satooshi/Bundle/CoverallsV1Bundle/Entity/Git/Commit.php
+++ /dev/null
@@ -1,244 +0,0 @@
-
- */
-class Commit extends Coveralls
-{
- /**
- * Commit ID.
- *
- * @var string
- */
- protected $id;
-
- /**
- * Author name.
- *
- * @var string
- */
- protected $authorName;
-
- /**
- * Author email.
- *
- * @var string
- */
- protected $authorEmail;
-
- /**
- * Committer name.
- *
- * @var string
- */
- protected $committerName;
-
- /**
- * Committer email.
- *
- * @var string
- */
- protected $committerEmail;
-
- /**
- * Commit message.
- *
- * @var string
- */
- protected $message;
-
- // API
-
- /**
- * {@inheritdoc}
- *
- * @see \Satooshi\Bundle\CoverallsBundle\Entity\ArrayConvertable::toArray()
- */
- public function toArray()
- {
- return array(
- 'id' => $this->id,
- 'author_name' => $this->authorName,
- 'author_email' => $this->authorEmail,
- 'committer_name' => $this->committerName,
- 'committer_email' => $this->committerEmail,
- 'message' => $this->message,
- );
- }
-
- // accessor
-
- /**
- * Set commit ID.
- *
- * @param string $id
- *
- * @return \Satooshi\Bundle\CoverallsV1Bundle\Entity\Git\Commit
- */
- public function setId($id)
- {
- $this->id = $id;
-
- return $this;
- }
-
- /**
- * Return commit ID.
- *
- * @return string|null
- */
- public function getId()
- {
- if (isset($this->id)) {
- return $this->id;
- }
-
- return;
- }
-
- /**
- * Set author name.
- *
- * @param string $authorName
- *
- * @return \Satooshi\Bundle\CoverallsV1Bundle\Entity\Git\Commit
- */
- public function setAuthorName($authorName)
- {
- $this->authorName = $authorName;
-
- return $this;
- }
-
- /**
- * Return author name.
- *
- * @return string|null
- */
- public function getAuthorName()
- {
- if (isset($this->authorName)) {
- return $this->authorName;
- }
-
- return;
- }
-
- /**
- * Set author email.
- *
- * @param string $authorEmail
- *
- * @return \Satooshi\Bundle\CoverallsV1Bundle\Entity\Git\Commit
- */
- public function setAuthorEmail($authorEmail)
- {
- $this->authorEmail = $authorEmail;
-
- return $this;
- }
-
- /**
- * Return author email.
- *
- * @return string|null
- */
- public function getAuthorEmail()
- {
- if (isset($this->authorEmail)) {
- return $this->authorEmail;
- }
-
- return;
- }
-
- /**
- * Set committer name.
- *
- * @param string $committerName
- *
- * @return \Satooshi\Bundle\CoverallsV1Bundle\Entity\Git\Commit
- */
- public function setCommitterName($committerName)
- {
- $this->committerName = $committerName;
-
- return $this;
- }
-
- /**
- * Return committer name.
- *
- * @return string|null
- */
- public function getCommitterName()
- {
- if (isset($this->committerName)) {
- return $this->committerName;
- }
-
- return;
- }
-
- /**
- * Set committer email.
- *
- * @param string $committerEmail
- *
- * @return \Satooshi\Bundle\CoverallsV1Bundle\Entity\Git\Commit
- */
- public function setCommitterEmail($committerEmail)
- {
- $this->committerEmail = $committerEmail;
-
- return $this;
- }
-
- /**
- * Return committer email.
- *
- * @return string|null
- */
- public function getCommitterEmail()
- {
- if (isset($this->committerEmail)) {
- return $this->committerEmail;
- }
-
- return;
- }
-
- /**
- * Set commit message.
- *
- * @param string $message
- *
- * @return \Satooshi\Bundle\CoverallsV1Bundle\Entity\Git\Commit
- */
- public function setMessage($message)
- {
- $this->message = $message;
-
- return $this;
- }
-
- /**
- * Return commit message.
- *
- * @return string|null
- */
- public function getMessage()
- {
- if (isset($this->message)) {
- return $this->message;
- }
-
- return;
- }
-}
diff --git a/vendor/php-coveralls/php-coveralls/src/Satooshi/Bundle/CoverallsV1Bundle/Entity/Git/Git.php b/vendor/php-coveralls/php-coveralls/src/Satooshi/Bundle/CoverallsV1Bundle/Entity/Git/Git.php
deleted file mode 100644
index c29df690245..00000000000
--- a/vendor/php-coveralls/php-coveralls/src/Satooshi/Bundle/CoverallsV1Bundle/Entity/Git/Git.php
+++ /dev/null
@@ -1,120 +0,0 @@
-
- */
-class Git extends Coveralls
-{
- /**
- * Branch name.
- *
- * @var string
- */
- protected $branch;
-
- /**
- * Head.
- *
- * @var Commit
- */
- protected $head;
-
- /**
- * Remote.
- *
- * @var Remote[]
- */
- protected $remotes;
-
- /**
- * Constructor.
- *
- * @param string $branch branch name
- * @param Commit $head hEAD commit
- * @param array $remotes remote repositories
- */
- public function __construct($branch, Commit $head, array $remotes)
- {
- $this->branch = $branch;
- $this->head = $head;
- $this->remotes = $remotes;
- }
-
- // API
-
- /**
- * {@inheritdoc}
- *
- * @see \Satooshi\Bundle\CoverallsBundle\Entity\ArrayConvertable::toArray()
- */
- public function toArray()
- {
- $remotes = array();
-
- foreach ($this->remotes as $remote) {
- $remotes[] = $remote->toArray();
- }
-
- return array(
- 'branch' => $this->branch,
- 'head' => $this->head->toArray(),
- 'remotes' => $remotes,
- );
- }
-
- // accessor
-
- /**
- * Return branch name.
- *
- * @return string
- */
- public function getBranch()
- {
- return $this->branch;
- }
-
- /**
- * Return HEAD commit.
- *
- * @return \Satooshi\Bundle\CoverallsV1Bundle\Entity\Git\Commit
- */
- public function getHead()
- {
- return $this->head;
- }
-
- /**
- * Return remote repositories.
- *
- * @return \Satooshi\Bundle\CoverallsV1Bundle\Entity\Git\Remote[]
- */
- public function getRemotes()
- {
- return $this->remotes;
- }
-}
diff --git a/vendor/php-coveralls/php-coveralls/src/Satooshi/Bundle/CoverallsV1Bundle/Entity/Git/Remote.php b/vendor/php-coveralls/php-coveralls/src/Satooshi/Bundle/CoverallsV1Bundle/Entity/Git/Remote.php
deleted file mode 100644
index ff0c4f9679e..00000000000
--- a/vendor/php-coveralls/php-coveralls/src/Satooshi/Bundle/CoverallsV1Bundle/Entity/Git/Remote.php
+++ /dev/null
@@ -1,100 +0,0 @@
-
- */
-class Remote extends Coveralls
-{
- /**
- * Remote name.
- *
- * @var string
- */
- protected $name;
-
- /**
- * Remote URL.
- *
- * @var string
- */
- protected $url;
-
- // API
-
- /**
- * {@inheritdoc}
- *
- * @see \Satooshi\Bundle\CoverallsBundle\Entity\ArrayConvertable::toArray()
- */
- public function toArray()
- {
- return array(
- 'name' => $this->name,
- 'url' => $this->url,
- );
- }
-
- // accessor
-
- /**
- * Set remote name.
- *
- * @param string $name remote name
- *
- * @return \Satooshi\Bundle\CoverallsV1Bundle\Entity\Git\Remote
- */
- public function setName($name)
- {
- $this->name = $name;
-
- return $this;
- }
-
- /**
- * Return remote name.
- *
- * @return string
- */
- public function getName()
- {
- if (isset($this->name)) {
- return $this->name;
- }
-
- return;
- }
-
- /**
- * Set remote URL.
- *
- * @param string $url remote URL
- *
- * @return \Satooshi\Bundle\CoverallsV1Bundle\Entity\Git\Remote
- */
- public function setUrl($url)
- {
- $this->url = $url;
-
- return $this;
- }
-
- /**
- * Return remote URL.
- *
- * @return string
- */
- public function getUrl()
- {
- if (isset($this->url)) {
- return $this->url;
- }
-
- return;
- }
-}
diff --git a/vendor/php-coveralls/php-coveralls/src/Satooshi/Bundle/CoverallsV1Bundle/Entity/JsonFile.php b/vendor/php-coveralls/php-coveralls/src/Satooshi/Bundle/CoverallsV1Bundle/Entity/JsonFile.php
deleted file mode 100644
index c17b312d4dc..00000000000
--- a/vendor/php-coveralls/php-coveralls/src/Satooshi/Bundle/CoverallsV1Bundle/Entity/JsonFile.php
+++ /dev/null
@@ -1,626 +0,0 @@
-
- */
-class JsonFile extends Coveralls
-{
- /**
- * Service name.
- *
- * @var string
- */
- protected $serviceName;
-
- /**
- * Service job id.
- *
- * @var string
- */
- protected $serviceJobId;
-
- /**
- * Service number (not documented).
- *
- * @var string
- */
- protected $serviceNumber;
-
- /**
- * Service event type (not documented).
- *
- * @var string
- */
- protected $serviceEventType;
-
- /**
- * Build URL of the project (not documented).
- *
- * @var string
- */
- protected $serviceBuildUrl;
-
- /**
- * Branch name (not documented).
- *
- * @var string
- */
- protected $serviceBranch;
-
- /**
- * Pull request info (not documented).
- *
- * @var string
- */
- protected $servicePullRequest;
-
- /**
- * Repository token.
- *
- * @var string
- */
- protected $repoToken;
-
- /**
- * Source files.
- *
- * @var \Satooshi\Bundle\CoverallsV1Bundle\Entity\SourceFile[]
- */
- protected $sourceFiles = array();
-
- /**
- * Git data.
- *
- * @var Git
- */
- protected $git;
-
- /**
- * A timestamp when the job ran. Must be parsable by Ruby.
- *
- * "2013-02-18 00:52:48 -0800"
- *
- * @var string
- */
- protected $runAt;
-
- /**
- * Metrics.
- *
- * @var Metrics
- */
- protected $metrics;
-
- // API
-
- /**
- * {@inheritdoc}
- *
- * @see \Satooshi\Bundle\CoverallsBundle\Entity\ArrayConvertable::toArray()
- */
- public function toArray()
- {
- $array = array();
-
- $arrayMap = array(
- // json key => property name
- 'service_name' => 'serviceName',
- 'service_job_id' => 'serviceJobId',
- 'service_number' => 'serviceNumber',
- 'service_build_url' => 'serviceBuildUrl',
- 'service_branch' => 'serviceBranch',
- 'service_pull_request' => 'servicePullRequest',
- 'service_event_type' => 'serviceEventType',
- 'repo_token' => 'repoToken',
- 'git' => 'git',
- 'run_at' => 'runAt',
- 'source_files' => 'sourceFiles',
- );
-
- foreach ($arrayMap as $jsonKey => $propName) {
- if (isset($this->$propName)) {
- $array[$jsonKey] = $this->toJsonProperty($this->$propName);
- }
- }
-
- $array['environment'] = array(
- 'packagist_version' => Version::VERSION,
- );
-
- return $array;
- }
-
- /**
- * Fill environment variables.
- *
- * @param array $env $_SERVER environment
- *
- * @throws \RuntimeException
- *
- * @return \Satooshi\Bundle\CoverallsV1Bundle\Entity\JsonFile
- */
- public function fillJobs(array $env)
- {
- return $this
- ->fillStandardizedEnvVars($env)
- ->ensureJobs();
- }
-
- /**
- * Exclude source files that have no executable statements.
- */
- public function excludeNoStatementsFiles()
- {
- $this->sourceFiles = array_filter(
- $this->sourceFiles,
- function (SourceFile $sourceFile) {
- return $sourceFile->getMetrics()->hasStatements();
- }
- );
- }
-
- /**
- * Sort source files by path.
- */
- public function sortSourceFiles()
- {
- ksort($this->sourceFiles);
- }
-
- /**
- * Return line coverage.
- *
- * @return float
- */
- public function reportLineCoverage()
- {
- $metrics = $this->getMetrics();
-
- foreach ($this->sourceFiles as $sourceFile) {
- /* @var $sourceFile \Satooshi\Bundle\CoverallsV1Bundle\Entity\SourceFile */
- $metrics->merge($sourceFile->getMetrics());
- }
-
- return $metrics->getLineCoverage();
- }
-
- // internal method
-
- /**
- * Convert to json property.
- *
- * @param mixed $prop
- *
- * @return mixed
- */
- protected function toJsonProperty($prop)
- {
- if ($prop instanceof Coveralls) {
- return $prop->toArray();
- } elseif (is_array($prop)) {
- return $this->toJsonPropertyArray($prop);
- }
-
- return $prop;
- }
-
- /**
- * Convert to array as json property.
- *
- * @param array $propArray
- *
- * @return array
- */
- protected function toJsonPropertyArray(array $propArray)
- {
- $array = array();
-
- foreach ($propArray as $prop) {
- $array[] = $this->toJsonProperty($prop);
- }
-
- return $array;
- }
-
- /**
- * Fill standardized environment variables.
- *
- * "CI_NAME", "CI_BUILD_NUMBER" must be set.
- *
- * Env vars are:
- *
- * * CI_NAME
- * * CI_BUILD_NUMBER
- * * CI_BUILD_URL
- * * CI_BRANCH
- * * CI_PULL_REQUEST
- *
- * These vars are supported by Codeship.
- *
- * @param array $env $_SERVER environment
- *
- * @return \Satooshi\Bundle\CoverallsV1Bundle\Entity\JsonFile
- */
- protected function fillStandardizedEnvVars(array $env)
- {
- $map = array(
- // defined in Ruby lib
- 'serviceName' => 'CI_NAME',
- 'serviceNumber' => 'CI_BUILD_NUMBER',
- 'serviceBuildUrl' => 'CI_BUILD_URL',
- 'serviceBranch' => 'CI_BRANCH',
- 'servicePullRequest' => 'CI_PULL_REQUEST',
-
- // extends by php-coveralls
- 'serviceJobId' => 'CI_JOB_ID',
- 'serviceEventType' => 'COVERALLS_EVENT_TYPE',
- 'repoToken' => 'COVERALLS_REPO_TOKEN',
- );
-
- foreach ($map as $propName => $envName) {
- if (isset($env[$envName])) {
- $this->$propName = $env[$envName];
- }
- }
-
- return $this;
- }
-
- /**
- * Ensure data consistency for jobs API.
- *
- * @throws \RuntimeException
- *
- * @return \Satooshi\Bundle\CoverallsV1Bundle\Entity\JsonFile
- */
- protected function ensureJobs()
- {
- if (!$this->hasSourceFiles()) {
- throw new \RuntimeException('source_files must be set');
- }
-
- if ($this->requireServiceJobId()) {
- return $this;
- }
-
- if ($this->requireServiceNumber()) {
- return $this;
- }
-
- if ($this->requireServiceEventType()) {
- return $this;
- }
-
- if ($this->requireRepoToken()) {
- return $this;
- }
-
- if ($this->isUnsupportedServiceJob()) {
- return $this;
- }
-
- throw new RequirementsNotSatisfiedException();
- }
-
- /**
- * Return whether the job requires "service_job_id" (for Travis CI).
- *
- * @return bool
- */
- protected function requireServiceJobId()
- {
- return isset($this->serviceName) && isset($this->serviceJobId) && !isset($this->repoToken);
- }
-
- /**
- * Return whether the job requires "service_number" (for CircleCI, Jenkins, Codeship or other CIs).
- *
- * @return bool
- */
- protected function requireServiceNumber()
- {
- return isset($this->serviceName) && isset($this->serviceNumber) && isset($this->repoToken);
- }
-
- /**
- * Return whether the job requires "service_event_type" (for local environment).
- *
- * @return bool
- */
- protected function requireServiceEventType()
- {
- return isset($this->serviceName) && isset($this->serviceEventType) && isset($this->repoToken);
- }
-
- /**
- * Return whether the job requires "repo_token" (for Travis PRO).
- *
- * @return bool
- */
- protected function requireRepoToken()
- {
- return isset($this->serviceName) && $this->serviceName === 'travis-pro' && isset($this->repoToken);
- }
-
- /**
- * Return whether the job is running on unsupported service.
- *
- * @return bool
- */
- protected function isUnsupportedServiceJob()
- {
- return !isset($this->serviceJobId) && !isset($this->serviceNumber) && !isset($this->serviceEventType) && isset($this->repoToken);
- }
-
- // accessor
-
- /**
- * Return whether the json file has source file.
- *
- * @param string $path absolute path to source file
- *
- * @return bool
- */
- public function hasSourceFile($path)
- {
- return isset($this->sourceFiles[$path]);
- }
-
- /**
- * Return source file.
- *
- * @param string $path absolute path to source file
- *
- * @return \Satooshi\Bundle\CoverallsV1Bundle\Entity\SourceFile|null
- */
- public function getSourceFile($path)
- {
- if ($this->hasSourceFile($path)) {
- return $this->sourceFiles[$path];
- }
-
- return;
- }
-
- /**
- * Add source file.
- *
- * @param SourceFile $sourceFile
- */
- public function addSourceFile(SourceFile $sourceFile)
- {
- $this->sourceFiles[$sourceFile->getPath()] = $sourceFile;
- }
-
- /**
- * Return whether the json file has a source file.
- *
- * @return bool
- */
- public function hasSourceFiles()
- {
- return count($this->sourceFiles) > 0;
- }
-
- /**
- * Return source files.
- *
- * @return \Satooshi\Bundle\CoverallsV1Bundle\Entity\SourceFile[]
- */
- public function getSourceFiles()
- {
- return $this->sourceFiles;
- }
-
- /**
- * Set service name.
- *
- * @param string $serviceName service name
- *
- * @return \Satooshi\Bundle\CoverallsV1Bundle\Entity\JsonFile
- */
- public function setServiceName($serviceName)
- {
- $this->serviceName = $serviceName;
-
- return $this;
- }
-
- /**
- * Return service name.
- *
- * @return string
- */
- public function getServiceName()
- {
- if (isset($this->serviceName)) {
- return $this->serviceName;
- }
-
- return;
- }
-
- /**
- * Set repository token.
- *
- * @param string $repoToken repository token
- *
- * @return \Satooshi\Bundle\CoverallsV1Bundle\Entity\JsonFile
- */
- public function setRepoToken($repoToken)
- {
- $this->repoToken = $repoToken;
-
- return $this;
- }
-
- /**
- * Return repository token.
- *
- * @return string
- */
- public function getRepoToken()
- {
- if (isset($this->repoToken)) {
- return $this->repoToken;
- }
-
- return;
- }
-
- /**
- * Set service job id.
- *
- * @param string $serviceJobId service job id
- *
- * @return \Satooshi\Bundle\CoverallsV1Bundle\Entity\JsonFile
- */
- public function setServiceJobId($serviceJobId)
- {
- $this->serviceJobId = $serviceJobId;
-
- return $this;
- }
-
- /**
- * Return service job id.
- *
- * @return string
- */
- public function getServiceJobId()
- {
- if (isset($this->serviceJobId)) {
- return $this->serviceJobId;
- }
-
- return;
- }
-
- /**
- * Return service number.
- *
- * @return string
- */
- public function getServiceNumber()
- {
- return $this->serviceNumber;
- }
-
- /**
- * Return service event type.
- *
- * @return string
- */
- public function getServiceEventType()
- {
- return $this->serviceEventType;
- }
-
- /**
- * Return build URL of the project.
- *
- * @return string
- */
- public function getServiceBuildUrl()
- {
- return $this->serviceBuildUrl;
- }
-
- /**
- * Return branch name.
- *
- * @return string
- */
- public function getServiceBranch()
- {
- return $this->serviceBranch;
- }
-
- /**
- * Return pull request info.
- *
- * @return string
- */
- public function getServicePullRequest()
- {
- return $this->servicePullRequest;
- }
-
- /**
- * Set git data.
- *
- * @param Git $git git data
- *
- * @return \Satooshi\Bundle\CoverallsV1Bundle\Entity\JsonFile
- */
- public function setGit(Git $git)
- {
- $this->git = $git;
-
- return $this;
- }
-
- /**
- * Return git data.
- *
- * @return Git
- */
- public function getGit()
- {
- if (isset($this->git)) {
- return $this->git;
- }
-
- return;
- }
-
- /**
- * Set timestamp when the job ran.
- *
- * @param string $runAt timestamp
- *
- * @return \Satooshi\Bundle\CoverallsV1Bundle\Entity\JsonFile
- */
- public function setRunAt($runAt)
- {
- $this->runAt = $runAt;
-
- return $this;
- }
-
- /**
- * Return timestamp when the job ran.
- *
- * @return string
- */
- public function getRunAt()
- {
- if (isset($this->runAt)) {
- return $this->runAt;
- }
-
- return;
- }
-
- /**
- * Return metrics.
- *
- * @return \Satooshi\Bundle\CoverallsV1Bundle\Entity\Metrics
- */
- public function getMetrics()
- {
- if (!isset($this->metrics)) {
- $this->metrics = new Metrics();
- }
-
- return $this->metrics;
- }
-}
diff --git a/vendor/php-coveralls/php-coveralls/src/Satooshi/Bundle/CoverallsV1Bundle/Entity/Metrics.php b/vendor/php-coveralls/php-coveralls/src/Satooshi/Bundle/CoverallsV1Bundle/Entity/Metrics.php
deleted file mode 100644
index c05f68010a8..00000000000
--- a/vendor/php-coveralls/php-coveralls/src/Satooshi/Bundle/CoverallsV1Bundle/Entity/Metrics.php
+++ /dev/null
@@ -1,144 +0,0 @@
-
- */
-class Metrics
-{
- /**
- * Number of statements.
- *
- * @var int
- */
- protected $statements;
-
- /**
- * Number of covered statements.
- *
- * @var int
- */
- protected $coveredStatements;
-
- /**
- * Line coverage.
- *
- * @var float
- */
- protected $lineCoverage;
-
- /**
- * Constructor.
- *
- * @param array $coverage coverage data
- */
- public function __construct(array $coverage = array())
- {
- if (!empty($coverage)) {
- // statements
- // not null
- $statementsArray = array_filter(
- $coverage,
- function ($line) {
- return $line !== null;
- }
- );
- $this->statements = count($statementsArray);
-
- // coveredstatements
- // gt 0
- $coveredArray = array_filter(
- $statementsArray,
- function ($line) {
- return $line > 0;
- }
- );
- $this->coveredStatements = count($coveredArray);
- } else {
- $this->statements = 0;
- $this->coveredStatements = 0;
- }
- }
-
- // API
-
- /**
- * Merge other metrics.
- *
- * @param Metrics $that
- */
- public function merge(Metrics $that)
- {
- $this->statements += $that->statements;
- $this->coveredStatements += $that->coveredStatements;
- $this->lineCoverage = null; // clear previous data
- }
-
- // internal method
-
- /**
- * Calculate line coverage.
- *
- * @param int $statements number of statements
- * @param int $coveredStatements number of covered statements
- *
- * @return float
- */
- protected function calculateLineCoverage($statements, $coveredStatements)
- {
- if ($statements === 0) {
- return 0;
- }
-
- return ($coveredStatements / $statements) * 100;
- }
-
- // accessor
-
- /**
- * Return whether the source file has executable statements.
- *
- * @return bool
- */
- public function hasStatements()
- {
- return $this->statements !== 0;
- }
-
- /**
- * Return number of statements.
- *
- * @return int
- */
- public function getStatements()
- {
- return $this->statements;
- }
-
- /**
- * Return number of covered statements.
- *
- * @return int
- */
- public function getCoveredStatements()
- {
- return $this->coveredStatements;
- }
-
- /**
- * Return line coverage.
- *
- * @return float
- */
- public function getLineCoverage()
- {
- if (!isset($this->lineCoverage)) {
- $this->lineCoverage = $this->calculateLineCoverage($this->statements, $this->coveredStatements);
- }
-
- return $this->lineCoverage;
- }
-}
diff --git a/vendor/php-coveralls/php-coveralls/src/Satooshi/Bundle/CoverallsV1Bundle/Entity/SourceFile.php b/vendor/php-coveralls/php-coveralls/src/Satooshi/Bundle/CoverallsV1Bundle/Entity/SourceFile.php
deleted file mode 100644
index 741e5e64872..00000000000
--- a/vendor/php-coveralls/php-coveralls/src/Satooshi/Bundle/CoverallsV1Bundle/Entity/SourceFile.php
+++ /dev/null
@@ -1,176 +0,0 @@
-
- */
-class SourceFile extends Coveralls
-{
- /**
- * Source filename.
- *
- * @var string
- */
- protected $name;
-
- /**
- * Source content.
- *
- * @var string
- */
- protected $source;
-
- /**
- * Coverage data of the source file.
- *
- * @var array
- */
- protected $coverage;
-
- /**
- * Absolute path.
- *
- * @var string
- */
- protected $path;
-
- /**
- * Line number of the source file.
- *
- * @var int
- */
- protected $fileLines;
-
- /**
- * Metrics.
- *
- * @var Metrics
- */
- protected $metrics;
-
- /**
- * Constructor.
- *
- * @param string $path absolute path
- * @param string $name source filename
- * @param string $eol end of line
- */
- public function __construct($path, $name, $eol = "\n")
- {
- $this->path = $path;
- $this->name = $name;
- $this->source = trim(file_get_contents($path));
-
- $lines = explode($eol, $this->source);
- $this->fileLines = count($lines);
- $this->coverage = array_fill(0, $this->fileLines, null);
- }
-
- /**
- * {@inheritdoc}
- *
- * @see \Satooshi\Bundle\CoverallsBundle\Entity\ArrayConvertable::toArray()
- */
- public function toArray()
- {
- return array(
- 'name' => $this->name,
- 'source' => $this->source,
- 'coverage' => $this->coverage,
- );
- }
-
- // API
-
- /**
- * Add coverage.
- *
- * @param int $lineNum line number
- * @param int $count number of covered
- */
- public function addCoverage($lineNum, $count)
- {
- if (array_key_exists($lineNum, $this->coverage)) {
- $this->coverage[$lineNum] += $count;
- }
- }
-
- /**
- * Return line coverage.
- *
- * @return float
- */
- public function reportLineCoverage()
- {
- return $this->getMetrics()->getLineCoverage();
- }
-
- // accessor
-
- /**
- * Return source filename.
- *
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * Return source content.
- *
- * @return string
- */
- public function getSource()
- {
- return $this->source;
- }
-
- /**
- * Return coverage data of the source file.
- *
- * @return array
- */
- public function getCoverage()
- {
- return $this->coverage;
- }
-
- /**
- * Return absolute path.
- *
- * @return string
- */
- public function getPath()
- {
- return $this->path;
- }
-
- /**
- * Return line number of the source file.
- *
- * @return int
- */
- public function getFileLines()
- {
- return $this->fileLines;
- }
-
- /**
- * Return metrics.
- *
- * @return \Satooshi\Bundle\CoverallsV1Bundle\Entity\Metrics
- */
- public function getMetrics()
- {
- if (!isset($this->metrics)) {
- $this->metrics = new Metrics($this->coverage);
- }
-
- return $this->metrics;
- }
-}
diff --git a/vendor/php-coveralls/php-coveralls/src/Satooshi/Bundle/CoverallsV1Bundle/Repository/JobsRepository.php b/vendor/php-coveralls/php-coveralls/src/Satooshi/Bundle/CoverallsV1Bundle/Repository/JobsRepository.php
deleted file mode 100644
index 1c2c9658535..00000000000
--- a/vendor/php-coveralls/php-coveralls/src/Satooshi/Bundle/CoverallsV1Bundle/Repository/JobsRepository.php
+++ /dev/null
@@ -1,279 +0,0 @@
-
- */
-class JobsRepository implements LoggerAwareInterface
-{
- /**
- * Jobs API.
- *
- * @var \Satooshi\Bundle\CoverallsV1Bundle\Api\Jobs
- */
- protected $api;
-
- /**
- * Configuration.
- *
- * @var \Satooshi\Bundle\CoverallsV1Bundle\Config\Configuration
- */
- protected $config;
-
- /**
- * Logger.
- *
- * @var \Psr\Log\LoggerInterface
- */
- protected $logger;
-
- /**
- * Constructor.
- *
- * @param Jobs $api aPI
- * @param Configuration $config configuration
- */
- public function __construct(Jobs $api, Configuration $config)
- {
- $this->api = $api;
- $this->config = $config;
- }
-
- // API
-
- /**
- * Persist coverage data to Coveralls.
- */
- public function persist()
- {
- try {
- $this
- ->collectCloverXml()
- ->collectGitInfo()
- ->collectEnvVars()
- ->dumpJsonFile()
- ->send();
- } catch (\Satooshi\Bundle\CoverallsV1Bundle\Entity\Exception\RequirementsNotSatisfiedException $e) {
- $this->logger->error(sprintf('%s', $e->getHelpMessage()));
- } catch (\Exception $e) {
- $this->logger->error(sprintf("%s\n\n%s", $e->getMessage(), $e->getTraceAsString()));
- }
- }
-
- // internal method
-
- /**
- * Collect clover XML into json_file.
- *
- * @return \Satooshi\Bundle\CoverallsV1Bundle\Repository\JobsRepository
- */
- protected function collectCloverXml()
- {
- $this->logger->info('Load coverage clover log:');
-
- foreach ($this->config->getCloverXmlPaths() as $path) {
- $this->logger->info(sprintf(' - %s', $path));
- }
-
- $jsonFile = $this->api->collectCloverXml()->getJsonFile();
-
- if ($jsonFile->hasSourceFiles()) {
- $this->logCollectedSourceFiles($jsonFile);
- }
-
- return $this;
- }
-
- /**
- * Collect git repository info into json_file.
- *
- * @return \Satooshi\Bundle\CoverallsV1Bundle\Repository\JobsRepository
- */
- protected function collectGitInfo()
- {
- $this->logger->info('Collect git info');
-
- $this->api->collectGitInfo();
-
- return $this;
- }
-
- /**
- * Collect environment variables.
- *
- * @return \Satooshi\Bundle\CoverallsV1Bundle\Repository\JobsRepository
- */
- protected function collectEnvVars()
- {
- $this->logger->info('Read environment variables');
-
- $this->api->collectEnvVars($_SERVER);
-
- return $this;
- }
-
- /**
- * Dump submitting json file.
- *
- * @return \Satooshi\Bundle\CoverallsV1Bundle\Repository\JobsRepository
- */
- protected function dumpJsonFile()
- {
- $jsonPath = $this->config->getJsonPath();
- $this->logger->info(sprintf('Dump submitting json file: %s', $jsonPath));
-
- $this->api->dumpJsonFile();
-
- $filesize = number_format(filesize($jsonPath) / 1024, 2); // kB
- $this->logger->info(sprintf('File size: %s kB', $filesize));
-
- return $this;
- }
-
- /**
- * Send json_file to Jobs API.
- */
- protected function send()
- {
- $this->logger->info(sprintf('Submitting to %s', Jobs::URL));
-
- try {
- $response = $this->api->send();
-
- $message = $response
- ? sprintf('Finish submitting. status: %s %s', $response->getStatusCode(), $response->getReasonPhrase())
- : 'Finish dry run';
-
- $this->logger->info($message);
-
- if ($response instanceof Response) {
- $this->logResponse($response);
- }
-
- return;
- } catch (\Guzzle\Http\Exception\CurlException $e) {
- // connection error
- $message = sprintf("Connection error occurred. %s\n\n%s", $e->getMessage(), $e->getTraceAsString());
- } catch (\Guzzle\Http\Exception\ClientErrorResponseException $e) {
- // 422 Unprocessable Entity
- $response = $e->getResponse();
- $message = sprintf('Client error occurred. status: %s %s', $response->getStatusCode(), $response->getReasonPhrase());
- } catch (\Guzzle\Http\Exception\ServerErrorResponseException $e) {
- // 500 Internal Server Error
- // 503 Service Unavailable
- $response = $e->getResponse();
- $message = sprintf('Server error occurred. status: %s %s', $response->getStatusCode(), $response->getReasonPhrase());
- }
-
- $this->logger->error($message);
-
- if (isset($response)) {
- $this->logResponse($response);
- }
- }
-
- // logging
-
- /**
- * Colorize coverage.
- *
- * * green 90% - 100%
- * * yellow 80% - 90%
- * * red 0% - 80%
- *
- * @param float $coverage coverage
- * @param string $format format string to colorize
- *
- * @return string
- */
- protected function colorizeCoverage($coverage, $format)
- {
- if ($coverage >= 90) {
- return sprintf('%s ', $format);
- } elseif ($coverage >= 80) {
- return sprintf('%s ', $format);
- }
-
- return sprintf('%s ', $format);
- }
-
- /**
- * Log collected source files.
- *
- * @param JsonFile $jsonFile json file
- */
- protected function logCollectedSourceFiles(JsonFile $jsonFile)
- {
- $sourceFiles = $jsonFile->getSourceFiles();
- $numFiles = count($sourceFiles);
-
- $this->logger->info(sprintf('Found %s source file%s:', number_format($numFiles), $numFiles > 1 ? 's' : ''));
-
- foreach ($sourceFiles as $sourceFile) {
- /* @var $sourceFile \Satooshi\Bundle\CoverallsV1Bundle\Entity\SourceFile */
- $coverage = $sourceFile->reportLineCoverage();
- $template = ' - ' . $this->colorizeCoverage($coverage, '%6.2f%%') . ' %s';
-
- $this->logger->info(sprintf($template, $coverage, $sourceFile->getName()));
- }
-
- $coverage = $jsonFile->reportLineCoverage();
- $template = 'Coverage: ' . $this->colorizeCoverage($coverage, '%6.2f%% (%d/%d)');
- $metrics = $jsonFile->getMetrics();
-
- $this->logger->info(sprintf($template, $coverage, $metrics->getCoveredStatements(), $metrics->getStatements()));
- }
-
- /**
- * Log response.
- *
- * @param Response $response aPI response
- */
- protected function logResponse(Response $response)
- {
- $raw_body = $response->getBody(true);
- $body = json_decode($raw_body, true);
- if ($body === null) {
- // the response body is not in JSON format
- $this->logger->error($raw_body);
- } elseif (isset($body['error'])) {
- if (isset($body['message'])) {
- $this->logger->error($body['message']);
- }
- } else {
- if (isset($body['message'])) {
- $this->logger->info(sprintf('Accepted %s', $body['message']));
- }
-
- if (isset($body['url'])) {
- $this->logger->info(sprintf('You can see the build on %s', $body['url']));
- }
- }
- }
-
- // LoggerAwareInterface
-
- /**
- * {@inheritdoc}
- *
- *
- * @see \Psr\Log\LoggerAwareInterface::setLogger()
- */
- public function setLogger(LoggerInterface $logger)
- {
- $this->logger = $logger;
- }
-}
diff --git a/vendor/php-coveralls/php-coveralls/src/Satooshi/Bundle/CoverallsV1Bundle/Version.php b/vendor/php-coveralls/php-coveralls/src/Satooshi/Bundle/CoverallsV1Bundle/Version.php
deleted file mode 100644
index 1d1329ef479..00000000000
--- a/vendor/php-coveralls/php-coveralls/src/Satooshi/Bundle/CoverallsV1Bundle/Version.php
+++ /dev/null
@@ -1,18 +0,0 @@
-
- */
-final class Version
-{
- /**
- * CoverallsV1Bundle version.
- *
- * @var string
- */
- const VERSION = '1.1.0';
-}
diff --git a/vendor/php-coveralls/php-coveralls/src/Satooshi/Component/File/Path.php b/vendor/php-coveralls/php-coveralls/src/Satooshi/Component/File/Path.php
deleted file mode 100644
index f2e13d2ce21..00000000000
--- a/vendor/php-coveralls/php-coveralls/src/Satooshi/Component/File/Path.php
+++ /dev/null
@@ -1,185 +0,0 @@
-
- */
-class Path
-{
- /**
- * Return whether the path is relative path.
- *
- * @param string $path path
- *
- * @return bool true if the path is relative path, false otherwise
- */
- public function isRelativePath($path)
- {
- if (strlen($path) === 0) {
- return true;
- }
-
- if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
- return !preg_match('/^[a-z]+\:\\\\/i', $path);
- }
-
- return strpos($path, DIRECTORY_SEPARATOR) !== 0;
- }
-
- /**
- * Cat file path.
- *
- * @param string $path file path
- * @param string $rootDir absolute path to project root directory
- *
- * @return string|false absolute path
- */
- public function toAbsolutePath($path, $rootDir)
- {
- if (!is_string($path)) {
- return false;
- }
-
- if ($this->isRelativePath($path)) {
- return $rootDir . DIRECTORY_SEPARATOR . $path;
- }
-
- return $path;
- }
-
- /**
- * Return real file path.
- *
- * @param string $path file path
- * @param string $rootDir absolute path to project root directory
- *
- * @return string|false real path string if the path string is passed and real path exists, false otherwise
- */
- public function getRealPath($path, $rootDir)
- {
- if (!is_string($path)) {
- return false;
- }
-
- if ($this->isRelativePath($path)) {
- return realpath($rootDir . DIRECTORY_SEPARATOR . $path);
- }
-
- return realpath($path);
- }
-
- /**
- * Return real directory path.
- *
- * @param string $path path
- * @param string $rootDir absolute path to project root directory
- *
- * @return string|false real directory path string if the path string is passed and real directory exists, false otherwise
- */
- public function getRealDir($path, $rootDir)
- {
- if (!is_string($path)) {
- return false;
- }
-
- if ($this->isRelativePath($path)) {
- return realpath($rootDir . DIRECTORY_SEPARATOR . dirname($path));
- }
-
- return realpath(dirname($path));
- }
-
- /**
- * Return real file path to write.
- *
- * @param string $path file path
- * @param string $rootDir absolute path to project root directory
- *
- * @return string|false real file path string if the parent directory exists, false otherwise
- */
- public function getRealWritingFilePath($path, $rootDir)
- {
- $realDir = $this->getRealDir($path, $rootDir);
-
- if (!is_string($realDir)) {
- return false;
- }
-
- return $realDir . DIRECTORY_SEPARATOR . basename($path);
- }
-
- /**
- * Return whether the real path exists.
- *
- * @param string|bool $realpath real path
- *
- * @return bool true if the real path exists, false otherwise
- */
- public function isRealPathExist($realpath)
- {
- return $realpath !== false && file_exists($realpath);
- }
-
- /**
- * Return whether the real file path exists.
- *
- * @param string|bool $realpath real file path
- *
- * @return bool true if the real file path exists, false otherwise
- */
- public function isRealFileExist($realpath)
- {
- return $this->isRealPathExist($realpath) && is_file($realpath);
- }
-
- /**
- * Return whether the real file path is readable.
- *
- * @param string|bool $realpath real file path
- *
- * @return bool true if the real file path is readable, false otherwise
- */
- public function isRealFileReadable($realpath)
- {
- return $this->isRealFileExist($realpath) && is_readable($realpath);
- }
-
- /**
- * Return whether the real file path is writable.
- *
- * @param string|bool $realpath real file path
- *
- * @return bool true if the real file path is writable, false otherwise
- */
- public function isRealFileWritable($realpath)
- {
- return $this->isRealFileExist($realpath) && is_writable($realpath);
- }
-
- /**
- * Return whether the real directory exists.
- *
- * @param string|bool $realpath real directory path
- *
- * @return bool true if the real directory exists, false otherwise
- */
- public function isRealDirExist($realpath)
- {
- return $this->isRealPathExist($realpath) && is_dir($realpath);
- }
-
- /**
- * Return whether the real directory is writable.
- *
- * @param string|bool $realpath real directory path
- *
- * @return bool true if the real directory is writable, false otherwise
- */
- public function isRealDirWritable($realpath)
- {
- return $this->isRealDirExist($realpath) && is_writable($realpath);
- }
-}
diff --git a/vendor/php-coveralls/php-coveralls/src/Satooshi/Component/Log/ConsoleLogger.php b/vendor/php-coveralls/php-coveralls/src/Satooshi/Component/Log/ConsoleLogger.php
deleted file mode 100644
index 078f2a5c5b3..00000000000
--- a/vendor/php-coveralls/php-coveralls/src/Satooshi/Component/Log/ConsoleLogger.php
+++ /dev/null
@@ -1,42 +0,0 @@
-
- */
-class ConsoleLogger extends AbstractLogger
-{
- /**
- * Output.
- *
- * @var \Symfony\Component\Console\Output\OutputInterface
- */
- protected $output;
-
- /**
- * Constructor.
- *
- * @param OutputInterface $output
- */
- public function __construct(OutputInterface $output)
- {
- $this->output = $output;
- }
-
- /**
- * {@inheritdoc}
- *
- *
- * @see \Psr\Log\LoggerInterface::log()
- */
- public function log($level, $message, array $context = array())
- {
- $this->output->writeln($message);
- }
-}
diff --git a/vendor/php-coveralls/php-coveralls/src/Satooshi/Component/System/Git/GitCommand.php b/vendor/php-coveralls/php-coveralls/src/Satooshi/Component/System/Git/GitCommand.php
deleted file mode 100644
index f96921096f0..00000000000
--- a/vendor/php-coveralls/php-coveralls/src/Satooshi/Component/System/Git/GitCommand.php
+++ /dev/null
@@ -1,62 +0,0 @@
-
- */
-class GitCommand extends SystemCommand
-{
- /**
- * @var SystemCommandExecutorInterface
- */
- private $executor;
-
- /**
- * Command name or path.
- *
- * @var string
- */
- protected $commandPath = 'git';
-
- public function __construct(SystemCommandExecutorInterface $executor = null)
- {
- $this->executor = $executor ? $executor : new SystemCommandExecutor();
- }
-
- /**
- * Return branch names.
- *
- * @return array
- */
- public function getBranches()
- {
- return $this->executor->execute('git branch');
- }
-
- /**
- * Return HEAD commit.
- *
- * @return array
- */
- public function getHeadCommit()
- {
- return $this->executor->execute("git log -1 --pretty=format:'%H%n%aN%n%ae%n%cN%n%ce%n%s'");
- }
-
- /**
- * Return remote repositories.
- *
- * @return array
- */
- public function getRemotes()
- {
- return $this->executor->execute('git remote -v');
- }
-}
diff --git a/vendor/php-coveralls/php-coveralls/src/Satooshi/Component/System/SystemCommand.php b/vendor/php-coveralls/php-coveralls/src/Satooshi/Component/System/SystemCommand.php
deleted file mode 100644
index 652a5866519..00000000000
--- a/vendor/php-coveralls/php-coveralls/src/Satooshi/Component/System/SystemCommand.php
+++ /dev/null
@@ -1,93 +0,0 @@
-
- */
-abstract class SystemCommand
-{
- /**
- * Command name or path.
- *
- * @var string
- */
- protected $commandPath;
-
- // API
-
- /**
- * Execute command.
- *
- * @return array
- */
- public function execute()
- {
- $command = $this->createCommand();
-
- return $this->executeCommand($command);
- }
-
- // internal method
-
- /**
- * Execute command.
- *
- * @param string $command
- *
- * @throws \RuntimeException
- *
- * @return array
- */
- protected function executeCommand($command)
- {
- exec($command, $result, $returnValue);
-
- if ($returnValue === 0) {
- return $result;
- }
-
- throw new \RuntimeException(sprintf('Failed to execute command: %s', $command), $returnValue);
- }
-
- /**
- * Create command.
- *
- * @param string $args command arguments
- *
- * @return string
- */
- protected function createCommand($args = null)
- {
- if ($args === null) {
- return $this->commandPath;
- }
-
- // escapeshellarg($args) ?
- return sprintf('%s %s', $this->commandPath, $args);
- }
-
- // accessor
-
- /**
- * Set command path.
- *
- * @param string $commandPath command name or path
- */
- public function setCommandPath($commandPath)
- {
- $this->commandPath = $commandPath;
- }
-
- /**
- * Return command path.
- *
- * @return string
- */
- public function getCommandPath()
- {
- return $this->commandPath;
- }
-}
diff --git a/vendor/php-coveralls/php-coveralls/src/Satooshi/Component/System/SystemCommandExecutor.php b/vendor/php-coveralls/php-coveralls/src/Satooshi/Component/System/SystemCommandExecutor.php
deleted file mode 100644
index 8d9d963dcf0..00000000000
--- a/vendor/php-coveralls/php-coveralls/src/Satooshi/Component/System/SystemCommandExecutor.php
+++ /dev/null
@@ -1,32 +0,0 @@
-
- * @author Dariusz Rumiński
- *
- * @internal
- */
-final class SystemCommandExecutor implements SystemCommandExecutorInterface
-{
- /**
- * Execute command.
- *
- * @param string $command
- *
- * @throws \RuntimeException
- *
- * @return array
- */
- public function execute($command)
- {
- exec($command, $result, $returnValue);
-
- if ($returnValue === 0) {
- return $result;
- }
-
- throw new \RuntimeException(sprintf('Failed to execute command: %s', $command), $returnValue);
- }
-}
diff --git a/vendor/php-coveralls/php-coveralls/src/Satooshi/Component/System/SystemCommandExecutorInterface.php b/vendor/php-coveralls/php-coveralls/src/Satooshi/Component/System/SystemCommandExecutorInterface.php
deleted file mode 100644
index ce625331661..00000000000
--- a/vendor/php-coveralls/php-coveralls/src/Satooshi/Component/System/SystemCommandExecutorInterface.php
+++ /dev/null
@@ -1,22 +0,0 @@
-
- *
- * @internal
- */
-interface SystemCommandExecutorInterface
-{
- /**
- * Execute command.
- *
- * @param string $command
- *
- * @throws \RuntimeException
- *
- * @return array
- */
- public function execute($command);
-}
diff --git a/vendor/php-coveralls/php-coveralls/tests/Satooshi/Bundle/CoverallsBundle/Console/ApplicationTest.php b/vendor/php-coveralls/php-coveralls/tests/Satooshi/Bundle/CoverallsBundle/Console/ApplicationTest.php
deleted file mode 100644
index cb7ccaaa12d..00000000000
--- a/vendor/php-coveralls/php-coveralls/tests/Satooshi/Bundle/CoverallsBundle/Console/ApplicationTest.php
+++ /dev/null
@@ -1,89 +0,0 @@
-
- */
-class ApplicationTest extends ProjectTestCase
-{
- protected function setUp()
- {
- $this->projectDir = realpath(__DIR__ . '/../../../..');
-
- $this->setUpDir($this->projectDir);
- }
-
- protected function tearDown()
- {
- $this->rmFile($this->cloverXmlPath);
- $this->rmFile($this->jsonPath);
- $this->rmDir($this->logsDir);
- $this->rmDir($this->buildDir);
- }
-
- protected function getCloverXml()
- {
- $xml = <<<'XML'
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-XML;
-
- return sprintf($xml, $this->srcDir, $this->srcDir);
- }
-
- protected function dumpCloverXml()
- {
- file_put_contents($this->cloverXmlPath, $this->getCloverXml());
- }
-
- /**
- * @test
- */
- public function shouldExecuteCoverallsV1JobsCommand()
- {
- $this->makeProjectDir(null, $this->logsDir);
- $this->dumpCloverXml();
-
- $app = new Application($this->rootDir, 'Coveralls API client for PHP', '1.0.0');
- $app->setAutoExit(false); // avoid to call exit() in Application
-
- // run
- $_SERVER['TRAVIS'] = true;
- $_SERVER['TRAVIS_JOB_ID'] = 'application_test';
-
- $tester = new ApplicationTester($app);
- $actual = $tester->run(
- array(
- '--dry-run' => true,
- '--config' => 'coveralls.yml',
- )
- );
-
- $this->assertSame(0, $actual);
- }
-}
diff --git a/vendor/php-coveralls/php-coveralls/tests/Satooshi/Bundle/CoverallsV1Bundle/Api/JobsTest.php b/vendor/php-coveralls/php-coveralls/tests/Satooshi/Bundle/CoverallsV1Bundle/Api/JobsTest.php
deleted file mode 100644
index b5f94f104d2..00000000000
--- a/vendor/php-coveralls/php-coveralls/tests/Satooshi/Bundle/CoverallsV1Bundle/Api/JobsTest.php
+++ /dev/null
@@ -1,659 +0,0 @@
-
- */
-class JobsTest extends ProjectTestCase
-{
- protected function setUp()
- {
- $this->projectDir = realpath(__DIR__ . '/../../../..');
-
- $this->setUpDir($this->projectDir);
- }
-
- protected function tearDown()
- {
- $this->rmFile($this->jsonPath);
- $this->rmFile($this->cloverXmlPath);
- $this->rmDir($this->logsDir);
- $this->rmDir($this->buildDir);
- }
-
- protected function createJobsWith()
- {
- $this->config = new Configuration();
-
- $this->config
- ->setJsonPath($this->jsonPath)
- ->setDryRun(false);
-
- $this->client = $this->createAdapterMockWith($this->url, $this->filename, $this->jsonPath);
-
- return new Jobs($this->config, $this->client);
- }
-
- protected function createJobsNeverSend()
- {
- $this->config = new Configuration();
- $this->config
- ->setJsonPath($this->jsonPath)
- ->setDryRun(false);
-
- $this->client = $this->createAdapterMockNeverCalled();
-
- return new Jobs($this->config, $this->client);
- }
-
- protected function createJobsNeverSendOnDryRun()
- {
- $this->config = new Configuration();
- $this->config
- ->setJsonPath($this->jsonPath)
- ->setDryRun(true);
-
- $this->client = $this->createAdapterMockNeverCalled();
-
- return new Jobs($this->config, $this->client);
- }
-
- protected function createAdapterMockNeverCalled()
- {
- $client = $this->prophesize('Guzzle\Http\Client');
- $client
- ->send()
- ->shouldNotBeCalled();
-
- return $client->reveal();
- }
-
- protected function createAdapterMockWith($url, $filename, $jsonPath)
- {
- $client = $this->prophesize('Guzzle\Http\Client');
- $request = $this->prophesize('Guzzle\Http\Message\EntityEnclosingRequest');
-
- $client
- ->post($url)
- ->willReturn($request->reveal());
-
- $request
- ->addPostFiles(array($filename => $jsonPath))
- ->willReturn($request->reveal());
-
- $request
- ->send(\Prophecy\Argument::cetera())
- ->shouldBeCalled();
-
- return $client->reveal();
- }
-
- protected function createConfiguration()
- {
- $config = new Configuration();
-
- return $config
- ->addCloverXmlPath($this->cloverXmlPath);
- }
-
- protected function getCloverXml()
- {
- $xml = <<<'XML'
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-XML;
-
- return sprintf($xml, $this->srcDir, $this->srcDir, $this->srcDir, $this->srcDir);
- }
-
- protected function createCloverXml()
- {
- $xml = $this->getCloverXml();
-
- return simplexml_load_string($xml);
- }
-
- protected function getNoSourceCloverXml()
- {
- return <<<'XML'
-
-
-
-
-
-
-
-
-
-
-
-
-XML;
- }
-
- protected function createNoSourceCloverXml()
- {
- $xml = $this->getNoSourceCloverXml();
-
- return simplexml_load_string($xml);
- }
-
- protected function collectJsonFile()
- {
- $xml = $this->createCloverXml();
- $collector = new CloverXmlCoverageCollector();
-
- return $collector->collect($xml, $this->srcDir);
- }
-
- protected function collectJsonFileWithoutSourceFiles()
- {
- $xml = $this->createNoSourceCloverXml();
- $collector = new CloverXmlCoverageCollector();
-
- return $collector->collect($xml, $this->srcDir);
- }
-
- protected function createCiEnvVarsCollector($config = null)
- {
- if ($config === null) {
- $config = $this->createConfiguration();
- }
-
- return new CiEnvVarsCollector($config);
- }
-
- // getJsonFile()
-
- /**
- * @test
- */
- public function shouldNotHaveJsonFileOnConstruction()
- {
- $object = $this->createJobsNeverSendOnDryRun();
-
- $this->assertNull($object->getJsonFile());
- }
-
- // setJsonFile()
-
- /**
- * @test
- */
- public function shouldSetJsonFile()
- {
- $jsonFile = $this->collectJsonFile();
-
- $object = $this->createJobsNeverSendOnDryRun()->setJsonFile($jsonFile);
-
- $this->assertSame($jsonFile, $object->getJsonFile());
- }
-
- // getConfiguration()
-
- /**
- * @test
- */
- public function shouldReturnConfiguration()
- {
- $config = $this->createConfiguration();
-
- $object = new Jobs($config);
-
- $this->assertSame($config, $object->getConfiguration());
- }
-
- // getHttpClient()
-
- /**
- * @test
- */
- public function shouldNotHaveHttpClientOnConstructionWithoutHttpClient()
- {
- $config = $this->createConfiguration();
-
- $object = new Jobs($config);
-
- $this->assertNull($object->getHttpClient());
- }
-
- /**
- * @test
- */
- public function shouldHaveHttpClientOnConstructionWithHttpClient()
- {
- $config = $this->createConfiguration();
- $client = $this->createAdapterMockNeverCalled();
-
- $object = new Jobs($config, $client);
-
- $this->assertSame($client, $object->getHttpClient());
- }
-
- // setHttpClient()
-
- /**
- * @test
- */
- public function shouldSetHttpClient()
- {
- $config = $this->createConfiguration();
- $client = $this->createAdapterMockNeverCalled();
-
- $object = new Jobs($config);
- $object->setHttpClient($client);
-
- $this->assertSame($client, $object->getHttpClient());
- }
-
- // collectCloverXml()
-
- /**
- * @test
- */
- public function shouldCollectCloverXml()
- {
- $this->makeProjectDir(null, $this->logsDir);
- $xml = $this->getCloverXml();
-
- file_put_contents($this->cloverXmlPath, $xml);
-
- $config = $this->createConfiguration();
-
- $object = new Jobs($config);
-
- $same = $object->collectCloverXml();
-
- // return $this
- $this->assertSame($same, $object);
-
- return $object;
- }
-
- /**
- * @test
- * @depends shouldCollectCloverXml
- */
- public function shouldHaveJsonFileAfterCollectCloverXml(Jobs $object)
- {
- $jsonFile = $object->getJsonFile();
-
- $this->assertNotNull($jsonFile);
- $sourceFiles = $jsonFile->getSourceFiles();
- $this->assertCount(4, $sourceFiles);
-
- return $jsonFile;
- }
-
- /**
- * @test
- * @depends shouldHaveJsonFileAfterCollectCloverXml
- */
- public function shouldNotHaveGitAfterCollectCloverXml(JsonFile $jsonFile)
- {
- $git = $jsonFile->getGit();
-
- $this->assertNull($git);
- }
-
- /**
- * @test
- */
- public function shouldCollectCloverXmlExcludingNoStatementsFiles()
- {
- $this->makeProjectDir(null, $this->logsDir);
- $xml = $this->getCloverXml();
-
- file_put_contents($this->cloverXmlPath, $xml);
-
- $config = $this->createConfiguration()->setExcludeNoStatements(true);
-
- $object = new Jobs($config);
-
- $same = $object->collectCloverXml();
-
- // return $this
- $this->assertSame($same, $object);
-
- return $object;
- }
-
- /**
- * @test
- * @depends shouldCollectCloverXmlExcludingNoStatementsFiles
- */
- public function shouldHaveJsonFileAfterCollectCloverXmlExcludingNoStatementsFiles(Jobs $object)
- {
- $jsonFile = $object->getJsonFile();
-
- $this->assertNotNull($jsonFile);
- $sourceFiles = $jsonFile->getSourceFiles();
- $this->assertCount(2, $sourceFiles);
-
- return $jsonFile;
- }
-
- // collectGitInfo()
-
- /**
- * @test
- * @depends shouldCollectCloverXml
- */
- public function shouldCollectGitInfo(Jobs $object)
- {
- $same = $object->collectGitInfo();
-
- // return $this
- $this->assertSame($same, $object);
-
- return $object;
- }
-
- /**
- * @test
- * @depends shouldCollectGitInfo
- */
- public function shouldHaveJsonFileAfterCollectGitInfo(Jobs $object)
- {
- $jsonFile = $object->getJsonFile();
-
- $this->assertNotNull($jsonFile);
-
- return $jsonFile;
- }
-
- /**
- * @test
- * @depends shouldHaveJsonFileAfterCollectGitInfo
- */
- public function shouldHaveGitAfterCollectGitInfo(JsonFile $jsonFile)
- {
- $git = $jsonFile->getGit();
-
- $this->assertNotNull($git);
- }
-
- // send()
-
- /**
- * @test
- */
- public function shouldSendTravisCiJob()
- {
- $this->makeProjectDir(null, $this->logsDir);
-
- $serviceName = 'travis-ci';
- $serviceJobId = '1.1';
-
- $server = array();
- $server['TRAVIS'] = true;
- $server['TRAVIS_JOB_ID'] = $serviceJobId;
-
- $object = $this->createJobsWith();
- $jsonFile = $this->collectJsonFile();
-
- $object
- ->setJsonFile($jsonFile)
- ->collectEnvVars($server)
- ->dumpJsonFile()
- ->send();
- }
-
- /**
- * @test
- */
- public function shouldSendTravisProJob()
- {
- $this->makeProjectDir(null, $this->logsDir);
-
- $serviceName = 'travis-pro';
- $serviceJobId = '1.1';
- $repoToken = 'your_token';
-
- $server = array();
- $server['TRAVIS'] = true;
- $server['TRAVIS_JOB_ID'] = $serviceJobId;
- $server['COVERALLS_REPO_TOKEN'] = $repoToken;
-
- $object = $this->createJobsWith();
- $config = $object->getConfiguration()->setServiceName($serviceName);
- $jsonFile = $this->collectJsonFile();
-
- $object
- ->setJsonFile($jsonFile)
- ->collectEnvVars($server)
- ->dumpJsonFile()
- ->send();
-
- $this->assertSame($serviceName, $jsonFile->getServiceName());
- $this->assertSame($serviceJobId, $jsonFile->getServiceJobId());
- $this->assertSame($repoToken, $jsonFile->getRepoToken());
- }
-
- /**
- * @test
- */
- public function shouldSendCircleCiJob()
- {
- $this->makeProjectDir(null, $this->logsDir);
-
- $serviceName = 'circleci';
- $serviceNumber = '123';
- $repoToken = 'token';
-
- $server = array();
- $server['COVERALLS_REPO_TOKEN'] = $repoToken;
- $server['CIRCLECI'] = 'true';
- $server['CIRCLE_BUILD_NUM'] = $serviceNumber;
-
- $object = $this->createJobsWith();
- $jsonFile = $this->collectJsonFile();
-
- $object
- ->setJsonFile($jsonFile)
- ->collectEnvVars($server)
- ->dumpJsonFile()
- ->send();
- }
-
- /**
- * @test
- */
- public function shouldSendJenkinsJob()
- {
- $this->makeProjectDir(null, $this->logsDir);
-
- $serviceName = 'jenkins';
- $serviceNumber = '123';
- $repoToken = 'token';
-
- $server = array();
- $server['COVERALLS_REPO_TOKEN'] = $repoToken;
- $server['JENKINS_URL'] = 'http://localhost:8080';
- $server['BUILD_NUMBER'] = $serviceNumber;
-
- $object = $this->createJobsWith();
- $jsonFile = $this->collectJsonFile();
-
- $object
- ->setJsonFile($jsonFile)
- ->collectEnvVars($server)
- ->dumpJsonFile()
- ->send();
- }
-
- /**
- * @test
- */
- public function shouldSendLocalJob()
- {
- $this->makeProjectDir(null, $this->logsDir);
-
- $serviceName = 'php-coveralls';
- $serviceEventType = 'manual';
-
- $server = array();
- $server['COVERALLS_RUN_LOCALLY'] = '1';
-
- $object = $this->createJobsWith();
- $config = $object->getConfiguration()->setRepoToken('token');
- $jsonFile = $this->collectJsonFile();
-
- $object
- ->setJsonFile($jsonFile)
- ->collectEnvVars($server)
- ->dumpJsonFile()
- ->send();
- }
-
- /**
- * @test
- */
- public function shouldSendUnsupportedJob()
- {
- $this->makeProjectDir(null, $this->logsDir);
-
- $server = array();
- $server['COVERALLS_REPO_TOKEN'] = 'token';
-
- $object = $this->createJobsWith();
- $jsonFile = $this->collectJsonFile();
-
- $object
- ->setJsonFile($jsonFile)
- ->collectEnvVars($server)
- ->dumpJsonFile()
- ->send();
- }
-
- /**
- * @test
- */
- public function shouldSendUnsupportedGitJob()
- {
- $this->makeProjectDir(null, $this->logsDir);
-
- $server = array();
- $server['COVERALLS_REPO_TOKEN'] = 'token';
- $server['GIT_COMMIT'] = 'abc123';
-
- $object = $this->createJobsWith();
- $jsonFile = $this->collectJsonFile();
-
- $object
- ->setJsonFile($jsonFile)
- ->collectEnvVars($server)
- ->dumpJsonFile()
- ->send();
- }
-
- /**
- * @test
- */
- public function shouldNotSendJobIfTestEnv()
- {
- $this->makeProjectDir(null, $this->logsDir);
-
- $server = array();
- $server['TRAVIS'] = true;
- $server['TRAVIS_JOB_ID'] = '1.1';
-
- $object = $this->createJobsNeverSendOnDryRun();
- $config = $object->getConfiguration()->setEnv('test');
- $jsonFile = $this->collectJsonFile();
-
- $object
- ->setJsonFile($jsonFile)
- ->collectEnvVars($server)
- ->dumpJsonFile()
- ->send();
- }
-
- /**
- * @test
- * @expectedException \RuntimeException
- */
- public function throwRuntimeExceptionIfInvalidEnv()
- {
- $server = array();
-
- $object = $this->createJobsNeverSend();
- $jsonFile = $this->collectJsonFile();
-
- $object
- ->setJsonFile($jsonFile)
- ->collectEnvVars($server)
- ->dumpJsonFile()
- ->send();
- }
-
- /**
- * @test
- * @expectedException \RuntimeException
- */
- public function throwRuntimeExceptionIfNoSourceFiles()
- {
- $server = array();
- $server['TRAVIS'] = true;
- $server['TRAVIS_JOB_ID'] = '1.1';
- $server['COVERALLS_REPO_TOKEN'] = 'token';
- $server['GIT_COMMIT'] = 'abc123';
-
- $object = $this->createJobsNeverSend();
- $jsonFile = $this->collectJsonFile();
-
- $object
- ->setJsonFile($jsonFile)
- ->collectEnvVars($server)
- ->dumpJsonFile()
- ->send();
- }
-}
diff --git a/vendor/php-coveralls/php-coveralls/tests/Satooshi/Bundle/CoverallsV1Bundle/Collector/CiEnvVarsCollectorTest.php b/vendor/php-coveralls/php-coveralls/tests/Satooshi/Bundle/CoverallsV1Bundle/Collector/CiEnvVarsCollectorTest.php
deleted file mode 100644
index a6fa4625ee4..00000000000
--- a/vendor/php-coveralls/php-coveralls/tests/Satooshi/Bundle/CoverallsV1Bundle/Collector/CiEnvVarsCollectorTest.php
+++ /dev/null
@@ -1,334 +0,0 @@
-
- */
-class CiEnvVarsCollectorTest extends ProjectTestCase
-{
- protected function setUp()
- {
- $this->projectDir = realpath(__DIR__ . '/../../../..');
-
- $this->setUpDir($this->projectDir);
- }
-
- protected function createConfiguration()
- {
- $config = new Configuration();
-
- return $config
- ->addCloverXmlPath($this->cloverXmlPath);
- }
-
- protected function createCiEnvVarsCollector($config = null)
- {
- if ($config === null) {
- $config = $this->createConfiguration();
- }
-
- return new CiEnvVarsCollector($config);
- }
-
- // collect()
-
- /**
- * @test
- */
- public function shouldCollectTravisCiEnvVars()
- {
- $serviceName = 'travis-ci';
- $serviceJobId = '1.1';
-
- $env = array();
- $env['TRAVIS'] = true;
- $env['TRAVIS_JOB_ID'] = $serviceJobId;
-
- $object = $this->createCiEnvVarsCollector();
-
- $actual = $object->collect($env);
-
- $this->assertArrayHasKey('CI_NAME', $actual);
- $this->assertSame($serviceName, $actual['CI_NAME']);
-
- $this->assertArrayHasKey('CI_JOB_ID', $actual);
- $this->assertSame($serviceJobId, $actual['CI_JOB_ID']);
-
- return $object;
- }
-
- /**
- * @test
- */
- public function shouldCollectTravisProEnvVars()
- {
- $serviceName = 'travis-pro';
- $serviceJobId = '1.2';
- $repoToken = 'your_token';
-
- $env = array();
- $env['TRAVIS'] = true;
- $env['TRAVIS_JOB_ID'] = $serviceJobId;
- $env['COVERALLS_REPO_TOKEN'] = $repoToken;
-
- $config = $this->createConfiguration();
- $config->setServiceName($serviceName);
-
- $object = $this->createCiEnvVarsCollector($config);
-
- $actual = $object->collect($env);
-
- $this->assertArrayHasKey('CI_NAME', $actual);
- $this->assertSame($serviceName, $actual['CI_NAME']);
-
- $this->assertArrayHasKey('CI_JOB_ID', $actual);
- $this->assertSame($serviceJobId, $actual['CI_JOB_ID']);
-
- $this->assertArrayHasKey('COVERALLS_REPO_TOKEN', $actual);
- $this->assertSame($repoToken, $actual['COVERALLS_REPO_TOKEN']);
-
- return $object;
- }
-
- /**
- * @test
- */
- public function shouldCollectCircleCiEnvVars()
- {
- $serviceName = 'circleci';
- $serviceNumber = '123';
-
- $env = array();
- $env['COVERALLS_REPO_TOKEN'] = 'token';
- $env['CIRCLECI'] = 'true';
- $env['CIRCLE_BUILD_NUM'] = $serviceNumber;
-
- $object = $this->createCiEnvVarsCollector();
-
- $actual = $object->collect($env);
-
- $this->assertArrayHasKey('CI_NAME', $actual);
- $this->assertSame($serviceName, $actual['CI_NAME']);
-
- $this->assertArrayHasKey('CI_BUILD_NUMBER', $actual);
- $this->assertSame($serviceNumber, $actual['CI_BUILD_NUMBER']);
-
- return $object;
- }
-
- /**
- * @test
- */
- public function shouldCollectJenkinsEnvVars()
- {
- $serviceName = 'jenkins';
- $serviceNumber = '123';
- $buildUrl = 'http://localhost:8080';
-
- $env = array();
- $env['COVERALLS_REPO_TOKEN'] = 'token';
- $env['JENKINS_URL'] = $buildUrl;
- $env['BUILD_NUMBER'] = $serviceNumber;
-
- $object = $this->createCiEnvVarsCollector();
-
- $actual = $object->collect($env);
-
- $this->assertArrayHasKey('CI_NAME', $actual);
- $this->assertSame($serviceName, $actual['CI_NAME']);
-
- $this->assertArrayHasKey('CI_BUILD_NUMBER', $actual);
- $this->assertSame($serviceNumber, $actual['CI_BUILD_NUMBER']);
-
- $this->assertArrayHasKey('CI_BUILD_URL', $actual);
- $this->assertSame($buildUrl, $actual['CI_BUILD_URL']);
-
- return $object;
- }
-
- /**
- * @test
- */
- public function shouldCollectLocalEnvVars()
- {
- $serviceName = 'php-coveralls';
- $serviceEventType = 'manual';
-
- $env = array();
- $env['COVERALLS_REPO_TOKEN'] = 'token';
- $env['COVERALLS_RUN_LOCALLY'] = '1';
-
- $object = $this->createCiEnvVarsCollector();
-
- $actual = $object->collect($env);
-
- $this->assertArrayHasKey('CI_NAME', $actual);
- $this->assertSame($serviceName, $actual['CI_NAME']);
-
- $this->assertArrayHasKey('COVERALLS_EVENT_TYPE', $actual);
- $this->assertSame($serviceEventType, $actual['COVERALLS_EVENT_TYPE']);
-
- $this->assertArrayHasKey('CI_JOB_ID', $actual);
- $this->assertNull($actual['CI_JOB_ID']);
-
- return $object;
- }
-
- /**
- * @test
- */
- public function shouldCollectUnsupportedConfig()
- {
- $repoToken = 'token';
-
- $env = array();
-
- $config = $this->createConfiguration();
- $config->setRepoToken($repoToken);
-
- $object = $this->createCiEnvVarsCollector($config);
-
- $actual = $object->collect($env);
-
- $this->assertArrayHasKey('COVERALLS_REPO_TOKEN', $actual);
- $this->assertSame($repoToken, $actual['COVERALLS_REPO_TOKEN']);
-
- return $object;
- }
-
- /**
- * @test
- */
- public function shouldCollectUnsupportedEnvVars()
- {
- $repoToken = 'token';
-
- $env = array();
- $env['COVERALLS_REPO_TOKEN'] = $repoToken;
-
- $object = $this->createCiEnvVarsCollector();
-
- $actual = $object->collect($env);
-
- $this->assertArrayHasKey('COVERALLS_REPO_TOKEN', $actual);
- $this->assertSame($repoToken, $actual['COVERALLS_REPO_TOKEN']);
-
- return $object;
- }
-
- // getReadEnv()
-
- /**
- * @test
- */
- public function shouldNotHaveReadEnvOnConstruction()
- {
- $object = $this->createCiEnvVarsCollector();
-
- $this->assertNull($object->getReadEnv());
- }
-
- /**
- * @test
- * @depends shouldCollectTravisCiEnvVars
- */
- public function shouldHaveReadEnvAfterCollectTravisCiEnvVars(CiEnvVarsCollector $object)
- {
- $readEnv = $object->getReadEnv();
-
- $this->assertCount(3, $readEnv);
- $this->assertArrayHasKey('TRAVIS', $readEnv);
- $this->assertArrayHasKey('TRAVIS_JOB_ID', $readEnv);
- $this->assertArrayHasKey('CI_NAME', $readEnv);
- }
-
- /**
- * @test
- * @depends shouldCollectTravisProEnvVars
- */
- public function shouldHaveReadEnvAfterCollectTravisProEnvVars(CiEnvVarsCollector $object)
- {
- $readEnv = $object->getReadEnv();
-
- $this->assertCount(4, $readEnv);
- $this->assertArrayHasKey('TRAVIS', $readEnv);
- $this->assertArrayHasKey('TRAVIS_JOB_ID', $readEnv);
- $this->assertArrayHasKey('CI_NAME', $readEnv);
- $this->assertArrayHasKey('COVERALLS_REPO_TOKEN', $readEnv);
- }
-
- /**
- * @test
- * @depends shouldCollectCircleCiEnvVars
- */
- public function shouldHaveReadEnvAfterCollectCircleCiEnvVars(CiEnvVarsCollector $object)
- {
- $readEnv = $object->getReadEnv();
-
- $this->assertCount(4, $readEnv);
- $this->assertArrayHasKey('COVERALLS_REPO_TOKEN', $readEnv);
- $this->assertArrayHasKey('CIRCLECI', $readEnv);
- $this->assertArrayHasKey('CIRCLE_BUILD_NUM', $readEnv);
- $this->assertArrayHasKey('CI_NAME', $readEnv);
- }
-
- /**
- * @test
- * @depends shouldCollectJenkinsEnvVars
- */
- public function shouldHaveReadEnvAfterCollectJenkinsEnvVars(CiEnvVarsCollector $object)
- {
- $readEnv = $object->getReadEnv();
-
- $this->assertCount(4, $readEnv);
- $this->assertArrayHasKey('COVERALLS_REPO_TOKEN', $readEnv);
- $this->assertArrayHasKey('JENKINS_URL', $readEnv);
- $this->assertArrayHasKey('BUILD_NUMBER', $readEnv);
- $this->assertArrayHasKey('CI_NAME', $readEnv);
- }
-
- /**
- * @test
- * @depends shouldCollectLocalEnvVars
- */
- public function shouldHaveReadEnvAfterCollectLocalEnvVars(CiEnvVarsCollector $object)
- {
- $readEnv = $object->getReadEnv();
-
- $this->assertCount(4, $readEnv);
- $this->assertArrayHasKey('COVERALLS_REPO_TOKEN', $readEnv);
- $this->assertArrayHasKey('COVERALLS_RUN_LOCALLY', $readEnv);
- $this->assertArrayHasKey('COVERALLS_EVENT_TYPE', $readEnv);
- $this->assertArrayHasKey('CI_NAME', $readEnv);
- }
-
- /**
- * @test
- * @depends shouldCollectUnsupportedConfig
- */
- public function shouldHaveReadEnvAfterCollectUnsupportedConfig(CiEnvVarsCollector $object)
- {
- $readEnv = $object->getReadEnv();
-
- $this->assertCount(1, $readEnv);
- $this->assertArrayHasKey('COVERALLS_REPO_TOKEN', $readEnv);
- }
-
- /**
- * @test
- * @depends shouldCollectUnsupportedEnvVars
- */
- public function shouldHaveReadEnvAfterCollectUnsupportedEnvVars(CiEnvVarsCollector $object)
- {
- $readEnv = $object->getReadEnv();
-
- $this->assertCount(1, $readEnv);
- $this->assertArrayHasKey('COVERALLS_REPO_TOKEN', $readEnv);
- }
-}
diff --git a/vendor/php-coveralls/php-coveralls/tests/Satooshi/Bundle/CoverallsV1Bundle/Collector/CloverXmlCoverageCollectorTest.php b/vendor/php-coveralls/php-coveralls/tests/Satooshi/Bundle/CoverallsV1Bundle/Collector/CloverXmlCoverageCollectorTest.php
deleted file mode 100644
index cc33d78359f..00000000000
--- a/vendor/php-coveralls/php-coveralls/tests/Satooshi/Bundle/CoverallsV1Bundle/Collector/CloverXmlCoverageCollectorTest.php
+++ /dev/null
@@ -1,270 +0,0 @@
-
- */
-class CloverXmlCoverageCollectorTest extends ProjectTestCase
-{
- protected function setUp()
- {
- $this->projectDir = realpath(__DIR__ . '/../../../..');
-
- $this->setUpDir($this->projectDir);
-
- $this->object = new CloverXmlCoverageCollector();
- }
-
- protected function createCloverXml()
- {
- $xml = <<<'XML'
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-XML;
-
- return simplexml_load_string(sprintf($xml, $this->srcDir, $this->srcDir, $this->srcDir, $this->srcDir));
- }
-
- // getJsonFile()
-
- /**
- * @test
- */
- public function shouldNotHaveJsonFileOnConstruction()
- {
- $this->assertNull($this->object->getJsonFile());
- }
-
- // collect() under srcDir
-
- /**
- * @test
- */
- public function shouldCollect()
- {
- $xml = $this->createCloverXml();
- $jsonFile = $this->object->collect($xml, $this->srcDir);
-
- $this->assertSame($jsonFile, $this->object->getJsonFile());
- $this->assertJsonFile($jsonFile, null, null, null, null, '2013-04-13 10:28:13 +0000');
-
- return $jsonFile;
- }
-
- /**
- * @test
- * @depends shouldCollect
- */
- public function shouldCollectSourceFiles(JsonFile $jsonFile)
- {
- $sourceFiles = $jsonFile->getSourceFiles();
-
- $this->assertCount(3, $sourceFiles);
-
- return $jsonFile;
- }
-
- /**
- * @test
- * @depends shouldCollectSourceFiles
- */
- public function shouldCollectSourceFileTest1(JsonFile $jsonFile)
- {
- $sourceFiles = $jsonFile->getSourceFiles();
-
- $name1 = 'test.php';
- $path1 = $this->srcDir . DIRECTORY_SEPARATOR . $name1;
-
- $this->assertArrayHasKey($path1, $sourceFiles);
- $this->assertSourceFileTest1($sourceFiles[$path1]);
- }
-
- /**
- * @test
- * @depends shouldCollectSourceFiles
- */
- public function shouldCollectSourceFileTest2(JsonFile $jsonFile)
- {
- $sourceFiles = $jsonFile->getSourceFiles();
-
- $name2 = 'test2.php';
- $path2 = $this->srcDir . DIRECTORY_SEPARATOR . $name2;
-
- $this->assertArrayHasKey($path2, $sourceFiles);
- $this->assertSourceFileTest2($sourceFiles[$path2]);
- }
-
- // collect() under /
-
- /**
- * @test
- */
- public function shouldCollectUnderRootDir()
- {
- $xml = $this->createCloverXml();
- $jsonFile = $this->object->collect($xml, DIRECTORY_SEPARATOR);
-
- $this->assertSame($jsonFile, $this->object->getJsonFile());
- $this->assertJsonFile($jsonFile, null, null, null, null, '2013-04-13 10:28:13 +0000');
-
- return $jsonFile;
- }
-
- /**
- * @test
- * @depends shouldCollectUnderRootDir
- */
- public function shouldCollectSourceFilesUnderRootDir(JsonFile $jsonFile)
- {
- $sourceFiles = $jsonFile->getSourceFiles();
-
- $this->assertCount(3, $sourceFiles);
-
- return $jsonFile;
- }
-
- /**
- * @test
- * @depends shouldCollectSourceFilesUnderRootDir
- */
- public function shouldCollectSourceFileTest1UnderRootDir(JsonFile $jsonFile)
- {
- $sourceFiles = $jsonFile->getSourceFiles();
-
- $name1 = 'test.php';
- $path1 = $this->srcDir . DIRECTORY_SEPARATOR . $name1;
-
- $this->assertArrayHasKey($path1, $sourceFiles);
- $this->assertSourceFileTest1UnderRootDir($sourceFiles[$path1]);
- }
-
- /**
- * @test
- * @depends shouldCollectSourceFilesUnderRootDir
- */
- public function shouldCollectSourceFileTest2UnderRootDir(JsonFile $jsonFile)
- {
- $sourceFiles = $jsonFile->getSourceFiles();
-
- $name2 = 'test2.php';
- $path2 = $this->srcDir . DIRECTORY_SEPARATOR . $name2;
-
- $this->assertArrayHasKey($path2, $sourceFiles);
- $this->assertSourceFileTest2UnderRootDir($sourceFiles[$path2]);
- }
-
- // custom assert
-
- protected function assertJsonFile($jsonFile, $serviceName, $serviceJobId, $repoToken, $git, $runAt)
- {
- $this->assertSame($serviceName, $jsonFile->getServiceName());
- $this->assertSame($serviceJobId, $jsonFile->getServiceJobId());
- $this->assertSame($repoToken, $jsonFile->getRepoToken());
- $this->assertSame($git, $jsonFile->getGit());
- $this->assertSame($runAt, $jsonFile->getRunAt());
- }
-
- protected function assertSourceFile(SourceFile $sourceFile, $name, $path, $fileLines, array $coverage, $source)
- {
- $this->assertSame($name, $sourceFile->getName());
- $this->assertSame($path, $sourceFile->getPath());
- $this->assertSame($fileLines, $sourceFile->getFileLines());
- $this->assertSame($coverage, $sourceFile->getCoverage());
- $this->assertSame($source, $sourceFile->getSource());
- }
-
- protected function assertSourceFileTest1(SourceFile $sourceFile)
- {
- $name1 = 'test.php';
- $path1 = $this->srcDir . DIRECTORY_SEPARATOR . $name1;
- $fileLines1 = 9;
- $coverage1 = array_fill(0, $fileLines1, null);
- $coverage1[6] = 3;
- $source1 = trim(file_get_contents($path1));
-
- $this->assertSourceFile($sourceFile, $name1, $path1, $fileLines1, $coverage1, $source1);
- }
-
- protected function assertSourceFileTest2(SourceFile $sourceFile)
- {
- $name2 = 'test2.php';
- $path2 = $this->srcDir . DIRECTORY_SEPARATOR . $name2;
- $fileLines2 = 10;
- $coverage2 = array_fill(0, $fileLines2, null);
- $coverage2[7] = 0;
- $source2 = trim(file_get_contents($path2));
-
- $this->assertSourceFile($sourceFile, $name2, $path2, $fileLines2, $coverage2, $source2);
- }
-
- protected function assertSourceFileTest1UnderRootDir(SourceFile $sourceFile)
- {
- $name1 = 'test.php';
- $path1 = $this->srcDir . DIRECTORY_SEPARATOR . $name1;
- $fileLines1 = 9;
- $coverage1 = array_fill(0, $fileLines1, null);
- $coverage1[6] = 3;
- $source1 = trim(file_get_contents($path1));
-
- $this->assertSourceFile($sourceFile, $path1, $path1, $fileLines1, $coverage1, $source1);
- }
-
- protected function assertSourceFileTest2UnderRootDir(SourceFile $sourceFile)
- {
- $name2 = 'test2.php';
- $path2 = $this->srcDir . DIRECTORY_SEPARATOR . $name2;
- $fileLines2 = 10;
- $coverage2 = array_fill(0, $fileLines2, null);
- $coverage2[7] = 0;
- $source2 = trim(file_get_contents($path2));
-
- $this->assertSourceFile($sourceFile, $path2, $path2, $fileLines2, $coverage2, $source2);
- }
-}
diff --git a/vendor/php-coveralls/php-coveralls/tests/Satooshi/Bundle/CoverallsV1Bundle/Collector/GitInfoCollectorTest.php b/vendor/php-coveralls/php-coveralls/tests/Satooshi/Bundle/CoverallsV1Bundle/Collector/GitInfoCollectorTest.php
deleted file mode 100644
index ea39bc17b37..00000000000
--- a/vendor/php-coveralls/php-coveralls/tests/Satooshi/Bundle/CoverallsV1Bundle/Collector/GitInfoCollectorTest.php
+++ /dev/null
@@ -1,219 +0,0 @@
-
- */
-class GitInfoCollectorTest extends \PHPUnit\Framework\TestCase
-{
- public function setUp()
- {
- $this->getBranchesValue = array(
- ' master',
- '* branch1',
- ' branch2',
- );
- $this->getHeadCommitValue = array(
- 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
- 'Author Name',
- 'author@satooshi.jp',
- 'Committer Name',
- 'committer@satooshi.jp',
- 'commit message',
- );
- $this->getRemotesValue = array(
- "origin\tgit@github.com:php-coveralls/php-coveralls.git (fetch)",
- "origin\tgit@github.com:php-coveralls/php-coveralls.git (push)",
- );
- }
-
- protected function createGitCommandStubWith($getBranchesValue, $getHeadCommitValue, $getRemotesValue)
- {
- $stub = $this->prophesize('Satooshi\Component\System\Git\GitCommand');
-
- $this->setUpGitCommandStubWithGetBranchesOnce($stub, $getBranchesValue);
- $this->setUpGitCommandStubWithGetHeadCommitOnce($stub, $getHeadCommitValue);
- $this->setUpGitCommandStubWithGetRemotesOnce($stub, $getRemotesValue);
-
- return $stub->reveal();
- }
-
- protected function createGitCommandStubCalledBranches($getBranchesValue)
- {
- $stub = $this->prophesize('Satooshi\Component\System\Git\GitCommand');
-
- $this->setUpGitCommandStubWithGetBranchesOnce($stub, $getBranchesValue);
- $this->setUpGitCommandStubWithGetHeadCommitNeverCalled($stub);
- $this->setUpGitCommandStubWithGetRemotesNeverCalled($stub);
-
- return $stub->reveal();
- }
-
- protected function createGitCommandStubCalledHeadCommit($getBranchesValue, $getHeadCommitValue, $getRemotesValue)
- {
- $stub = $this->prophesize('Satooshi\Component\System\Git\GitCommand');
-
- $this->setUpGitCommandStubWithGetBranchesOnce($stub, $getBranchesValue);
- $this->setUpGitCommandStubWithGetHeadCommitOnce($stub, $getHeadCommitValue);
- $this->setUpGitCommandStubWithGetRemotesNeverCalled($stub);
-
- return $stub->reveal();
- }
-
- protected function setUpGitCommandStubWithGetBranchesOnce($stub, $getBranchesValue)
- {
- $stub
- ->getBranches()
- ->willReturn($getBranchesValue)
- ->shouldBeCalled();
- }
-
- protected function setUpGitCommandStubWithGetHeadCommitOnce($stub, $getHeadCommitValue)
- {
- $stub
- ->getHeadCommit()
- ->willReturn($getHeadCommitValue)
- ->shouldBeCalled();
- }
-
- protected function setUpGitCommandStubWithGetHeadCommitNeverCalled($stub)
- {
- $stub
- ->getHeadCommit()
- ->shouldNotBeCalled();
- }
-
- protected function setUpGitCommandStubWithGetRemotesOnce($stub, $getRemotesValue)
- {
- $stub
- ->getRemotes()
- ->willReturn($getRemotesValue)
- ->shouldBeCalled();
- }
-
- protected function setUpGitCommandStubWithGetRemotesNeverCalled($stub)
- {
- $stub
- ->getRemotes()
- ->shouldNotBeCalled();
- }
-
- // getCommand()
-
- /**
- * @test
- */
- public function shouldHaveGitCommandOnConstruction()
- {
- $command = new GitCommand();
- $object = new GitInfoCollector($command);
-
- $this->assertSame($command, $object->getCommand());
- }
-
- // collect()
-
- /**
- * @test
- */
- public function shouldCollect()
- {
- $gitCommand = $this->createGitCommandStubWith($this->getBranchesValue, $this->getHeadCommitValue, $this->getRemotesValue);
- $object = new GitInfoCollector($gitCommand);
-
- $git = $object->collect();
-
- $this->assertInstanceOf('Satooshi\Bundle\CoverallsV1Bundle\Entity\Git\Git', $git);
- $this->assertGit($git);
- }
-
- protected function assertGit(Git $git)
- {
- $this->assertSame('branch1', $git->getBranch());
-
- $commit = $git->getHead();
-
- $this->assertInstanceOf('Satooshi\Bundle\CoverallsV1Bundle\Entity\Git\Commit', $commit);
- $this->assertCommit($commit);
-
- $remotes = $git->getRemotes();
- $this->assertCount(1, $remotes);
-
- $this->assertInstanceOf('Satooshi\Bundle\CoverallsV1Bundle\Entity\Git\Remote', $remotes[0]);
- $this->assertRemote($remotes[0]);
- }
-
- protected function assertCommit(Commit $commit)
- {
- $this->assertSame('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', $commit->getId());
- $this->assertSame('Author Name', $commit->getAuthorName());
- $this->assertSame('author@satooshi.jp', $commit->getAuthorEmail());
- $this->assertSame('Committer Name', $commit->getCommitterName());
- $this->assertSame('committer@satooshi.jp', $commit->getCommitterEmail());
- $this->assertSame('commit message', $commit->getMessage());
- }
-
- protected function assertRemote(Remote $remote)
- {
- $this->assertSame('origin', $remote->getName());
- $this->assertSame('git@github.com:php-coveralls/php-coveralls.git', $remote->getUrl());
- }
-
- // collectBranch() exception
-
- /**
- * @test
- * @expectedException \RuntimeException
- */
- public function throwRuntimeExceptionIfCurrentBranchNotFound()
- {
- $getBranchesValue = array(
- ' master',
- );
- $gitCommand = $this->createGitCommandStubCalledBranches($getBranchesValue);
-
- $object = new GitInfoCollector($gitCommand);
-
- $object->collect();
- }
-
- // collectCommit() exception
-
- /**
- * @test
- * @expectedException \RuntimeException
- */
- public function throwRuntimeExceptionIfHeadCommitIsInvalid()
- {
- $getHeadCommitValue = array();
- $gitCommand = $this->createGitCommandStubCalledHeadCommit($this->getBranchesValue, $getHeadCommitValue, $this->getRemotesValue);
-
- $object = new GitInfoCollector($gitCommand);
-
- $object->collect();
- }
-
- // collectRemotes() exception
-
- /**
- * @test
- * @expectedException \RuntimeException
- */
- public function throwRuntimeExceptionIfRemoteIsInvalid()
- {
- $getRemotesValue = array();
- $gitCommand = $this->createGitCommandStubWith($this->getBranchesValue, $this->getHeadCommitValue, $getRemotesValue);
-
- $object = new GitInfoCollector($gitCommand);
-
- $object->collect();
- }
-}
diff --git a/vendor/php-coveralls/php-coveralls/tests/Satooshi/Bundle/CoverallsV1Bundle/Command/CoverallsV1JobsCommandTest.php b/vendor/php-coveralls/php-coveralls/tests/Satooshi/Bundle/CoverallsV1Bundle/Command/CoverallsV1JobsCommandTest.php
deleted file mode 100644
index 56187154af2..00000000000
--- a/vendor/php-coveralls/php-coveralls/tests/Satooshi/Bundle/CoverallsV1Bundle/Command/CoverallsV1JobsCommandTest.php
+++ /dev/null
@@ -1,208 +0,0 @@
-
- */
-class CoverallsV1JobsCommandTest extends ProjectTestCase
-{
- protected function setUp()
- {
- $this->projectDir = realpath(__DIR__ . '/../../../..');
-
- $this->setUpDir($this->projectDir);
- }
-
- protected function tearDown()
- {
- $this->rmFile($this->cloverXmlPath);
- $this->rmFile($this->jsonPath);
- $this->rmDir($this->logsDir);
- $this->rmDir($this->buildDir);
- }
-
- protected function getCloverXml()
- {
- $xml = <<<'XML'
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-XML;
-
- return sprintf($xml, $this->srcDir, $this->srcDir);
- }
-
- protected function dumpCloverXml()
- {
- file_put_contents($this->cloverXmlPath, $this->getCloverXml());
- }
-
- /**
- * @test
- */
- public function shouldExecuteCoverallsV1JobsCommand()
- {
- $this->makeProjectDir(null, $this->logsDir);
- $this->dumpCloverXml();
-
- $command = new CoverallsV1JobsCommand();
- $command->setRootDir($this->rootDir);
-
- $app = new Application();
- $app->add($command);
-
- $command = $app->find('coveralls:v1:jobs');
- $commandTester = new CommandTester($command);
-
- $_SERVER['TRAVIS'] = true;
- $_SERVER['TRAVIS_JOB_ID'] = 'command_test';
-
- $actual = $commandTester->execute(
- array(
- 'command' => $command->getName(),
- '--dry-run' => true,
- '--config' => 'coveralls.yml',
- '--env' => 'test',
- )
- );
-
- $this->assertSame(0, $actual);
-
- // It should succeed too with a correct coverage_clover option.
- $actual = $commandTester->execute(
- array(
- 'command' => $command->getName(),
- '--dry-run' => true,
- '--config' => 'coveralls.yml',
- '--env' => 'test',
- '--coverage_clover' => 'build/logs/clover.xml',
- )
- );
-
- $this->assertSame(0, $actual);
- }
-
- /**
- * @test
- * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException
- */
- public function shouldExecuteCoverallsV1JobsCommandWithWrongRootDir()
- {
- $this->makeProjectDir(null, $this->logsDir);
- $this->dumpCloverXml();
-
- $command = new CoverallsV1JobsCommand();
- $command->setRootDir($this->logsDir); // Wrong rootDir.
-
- $app = new Application();
- $app->add($command);
-
- $command = $app->find('coveralls:v1:jobs');
- $commandTester = new CommandTester($command);
-
- $_SERVER['TRAVIS'] = true;
- $_SERVER['TRAVIS_JOB_ID'] = 'command_test';
-
- $actual = $commandTester->execute(
- array(
- 'command' => $command->getName(),
- '--dry-run' => true,
- '--config' => 'coveralls.yml',
- '--env' => 'test',
- )
- );
-
- $this->assertSame(0, $actual);
- }
-
- /**
- * @test
- */
- public function shouldExecuteCoverallsV1JobsCommandWithRootDirOverride()
- {
- $this->makeProjectDir(null, $this->logsDir);
- $this->dumpCloverXml();
-
- $command = new CoverallsV1JobsCommand();
- $command->setRootDir($this->logsDir); // Wrong rootDir.
-
- $app = new Application();
- $app->add($command);
-
- $command = $app->find('coveralls:v1:jobs');
- $commandTester = new CommandTester($command);
-
- $_SERVER['TRAVIS'] = true;
- $_SERVER['TRAVIS_JOB_ID'] = 'command_test';
-
- $actual = $commandTester->execute(
- array(
- 'command' => $command->getName(),
- '--dry-run' => true,
- '--config' => 'coveralls.yml',
- '--env' => 'test',
- // Overriding with a correct one.
- '--root_dir' => $this->rootDir,
- )
- );
-
- $this->assertSame(0, $actual);
- }
-
- /**
- * @test
- * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException
- */
- public function shouldExecuteCoverallsV1JobsCommandThrowInvalidConfigurationException()
- {
- $this->makeProjectDir(null, $this->logsDir);
- $this->dumpCloverXml();
-
- $command = new CoverallsV1JobsCommand();
- $command->setRootDir($this->rootDir);
-
- $app = new Application();
- $app->add($command);
-
- $command = $app->find('coveralls:v1:jobs');
- $commandTester = new CommandTester($command);
-
- $_SERVER['TRAVIS'] = true;
- $_SERVER['TRAVIS_JOB_ID'] = 'command_test';
-
- $actual = $commandTester->execute(
- array(
- 'command' => $command->getName(),
- '--dry-run' => true,
- '--config' => 'coveralls.yml',
- '--env' => 'test',
- '--coverage_clover' => 'nonexistense.xml',
- )
- );
- }
-}
diff --git a/vendor/php-coveralls/php-coveralls/tests/Satooshi/Bundle/CoverallsV1Bundle/Config/ConfigurationTest.php b/vendor/php-coveralls/php-coveralls/tests/Satooshi/Bundle/CoverallsV1Bundle/Config/ConfigurationTest.php
deleted file mode 100644
index ad7caaa3728..00000000000
--- a/vendor/php-coveralls/php-coveralls/tests/Satooshi/Bundle/CoverallsV1Bundle/Config/ConfigurationTest.php
+++ /dev/null
@@ -1,406 +0,0 @@
-
- */
-class ConfigurationTest extends \PHPUnit\Framework\TestCase
-{
- protected function setUp()
- {
- $this->object = new Configuration();
- }
-
- // hasRepoToken()
- // getRepoToken()
-
- /**
- * @test
- */
- public function shouldNotHaveRepoTokenOnConstruction()
- {
- $this->assertFalse($this->object->hasRepoToken());
- $this->assertNull($this->object->getRepoToken());
- }
-
- // hasServiceName()
- // getServiceName()
-
- /**
- * @test
- */
- public function shouldNotHaveServiceNameOnConstruction()
- {
- $this->assertFalse($this->object->hasServiceName());
- $this->assertNull($this->object->getServiceName());
- }
-
- // getCloverXmlPaths()
-
- /**
- * @test
- */
- public function shouldHaveEmptyCloverXmlPathsOnConstruction()
- {
- $this->assertEmpty($this->object->getCloverXmlPaths());
- }
-
- // getRootDir()
-
- /**
- * @test
- */
- public function shouldNotRootDirOnConstruction()
- {
- $this->assertNull($this->object->getRootDir());
- }
-
- // getJsonPath()
-
- /**
- * @test
- */
- public function shouldNotHaveJsonPathOnConstruction()
- {
- $this->assertNull($this->object->getJsonPath());
- }
-
- // isDryRun()
-
- /**
- * @test
- */
- public function shouldBeDryRunOnConstruction()
- {
- $this->assertTrue($this->object->isDryRun());
- }
-
- // isExcludeNoStatements()
-
- /**
- * @test
- */
- public function shouldNotBeExcludeNotStatementsOnConstruction()
- {
- $this->assertFalse($this->object->isExcludeNoStatements());
- }
-
- // isVerbose
-
- /**
- * @test
- */
- public function shouldNotBeVerboseOnConstruction()
- {
- $this->assertFalse($this->object->isVerbose());
- }
-
- // getEnv()
-
- /**
- * @test
- */
- public function shouldBeProdEnvOnConstruction()
- {
- $this->assertSame('prod', $this->object->getEnv());
- }
-
- // isTestEnv()
-
- /**
- * @test
- */
- public function shouldBeTestEnv()
- {
- $expected = 'test';
-
- $this->object->setEnv($expected);
-
- $this->assertSame($expected, $this->object->getEnv());
- $this->assertTrue($this->object->isTestEnv());
- $this->assertFalse($this->object->isDevEnv());
- $this->assertFalse($this->object->isProdEnv());
- }
-
- // isDevEnv()
-
- /**
- * @test
- */
- public function shouldBeDevEnv()
- {
- $expected = 'dev';
-
- $this->object->setEnv($expected);
-
- $this->assertSame($expected, $this->object->getEnv());
- $this->assertFalse($this->object->isTestEnv());
- $this->assertTrue($this->object->isDevEnv());
- $this->assertFalse($this->object->isProdEnv());
- }
-
- // isProdEnv()
-
- /**
- * @test
- */
- public function shouldBeProdEnv()
- {
- $expected = 'prod';
-
- $this->object->setEnv($expected);
-
- $this->assertSame($expected, $this->object->getEnv());
- $this->assertFalse($this->object->isTestEnv());
- $this->assertFalse($this->object->isDevEnv());
- $this->assertTrue($this->object->isProdEnv());
- }
-
- // setRootDir()
-
- /**
- * @test
- */
- public function shouldSetRootDir()
- {
- $expected = '/root';
-
- $same = $this->object->setRootDir($expected);
-
- $this->assertSame($same, $this->object);
- $this->assertSame($expected, $this->object->getRootDir());
- }
-
- // setRepoToken()
-
- /**
- * @test
- */
- public function shouldSetRepoToken()
- {
- $expected = 'token';
-
- $same = $this->object->setRepoToken($expected);
-
- $this->assertSame($same, $this->object);
- $this->assertSame($expected, $this->object->getRepoToken());
- }
-
- // setServiceName()
-
- /**
- * @test
- */
- public function shouldSetServiceName()
- {
- $expected = 'travis-ci';
-
- $same = $this->object->setServiceName($expected);
-
- $this->assertSame($same, $this->object);
- $this->assertSame($expected, $this->object->getServiceName());
- }
-
- // setCloverXmlPaths()
-
- /**
- * @test
- */
- public function shouldSetCloverXmlPaths()
- {
- $expected = array('/path/to/clover.xml');
-
- $same = $this->object->setCloverXmlPaths($expected);
-
- $this->assertSame($same, $this->object);
- $this->assertSame($expected, $this->object->getCloverXmlPaths());
- }
-
- // addCloverXmlPath()
-
- /**
- * @test
- */
- public function shouldAddCloverXmlPath()
- {
- $expected = '/path/to/clover.xml';
-
- $same = $this->object->addCloverXmlPath($expected);
-
- $this->assertSame($same, $this->object);
- $this->assertSame(array($expected), $this->object->getCloverXmlPaths());
- }
-
- // setJsonPath()
-
- /**
- * @test
- */
- public function shouldSetJsonPath()
- {
- $expected = '/path/to/coveralls-upload.json';
-
- $same = $this->object->setJsonPath($expected);
-
- $this->assertSame($same, $this->object);
- $this->assertSame($expected, $this->object->getJsonPath());
- }
-
- // setDryRun()
-
- /**
- * @test
- */
- public function shouldSetDryRunFalse()
- {
- $expected = false;
-
- $same = $this->object->setDryRun($expected);
-
- $this->assertSame($same, $this->object);
- $this->assertFalse($this->object->isDryRun());
- }
-
- /**
- * @test
- */
- public function shouldSetDryRunTrue()
- {
- $expected = true;
-
- $same = $this->object->setDryRun($expected);
-
- $this->assertSame($same, $this->object);
- $this->assertTrue($this->object->isDryRun());
- }
-
- // setExcludeNoStatements()
-
- /**
- * @test
- */
- public function shouldSetExcludeNoStatementsFalse()
- {
- $expected = false;
-
- $same = $this->object->setExcludeNoStatements($expected);
-
- $this->assertSame($same, $this->object);
- $this->assertFalse($this->object->isExcludeNoStatements());
- }
-
- /**
- * @test
- */
- public function shouldSetExcludeNoStatementsTrue()
- {
- $expected = true;
-
- $same = $this->object->setExcludeNoStatements($expected);
-
- $this->assertSame($same, $this->object);
- $this->assertTrue($this->object->isExcludeNoStatements());
- }
-
- // setExcludeNoStatementsUnlessFalse()
-
- /**
- * @test
- */
- public function shouldSetExcludeNoStatementsFalseUnlessFalse()
- {
- $expected = false;
-
- $same = $this->object->setExcludeNoStatementsUnlessFalse($expected);
-
- $this->assertSame($same, $this->object);
- $this->assertFalse($this->object->isExcludeNoStatements());
- }
-
- /**
- * @test
- */
- public function shouldSetExcludeNoStatementsTrueUnlessFalse()
- {
- $expected = true;
-
- $same = $this->object->setExcludeNoStatementsUnlessFalse($expected);
-
- $this->assertSame($same, $this->object);
- $this->assertTrue($this->object->isExcludeNoStatements());
- }
-
- /**
- * @test
- */
- public function shouldSetExcludeNoStatementsTrueIfFalsePassedAndIfTrueWasSet()
- {
- $expected = false;
-
- $same = $this->object->setExcludeNoStatements(true);
- $same = $this->object->setExcludeNoStatementsUnlessFalse($expected);
-
- $this->assertSame($same, $this->object);
- $this->assertTrue($this->object->isExcludeNoStatements());
- }
-
- /**
- * @test
- */
- public function shouldSetExcludeNoStatementsTrueIfTruePassedAndIfTrueWasSet()
- {
- $expected = true;
-
- $same = $this->object->setExcludeNoStatements(true);
- $same = $this->object->setExcludeNoStatementsUnlessFalse($expected);
-
- $this->assertSame($same, $this->object);
- $this->assertTrue($this->object->isExcludeNoStatements());
- }
-
- // setVerbose()
-
- /**
- * @test
- */
- public function shouldSetVerboseFalse()
- {
- $expected = false;
-
- $same = $this->object->setVerbose($expected);
-
- $this->assertSame($same, $this->object);
- $this->assertFalse($this->object->isVerbose());
- }
-
- /**
- * @test
- */
- public function shouldSetVerboseTrue()
- {
- $expected = true;
-
- $same = $this->object->setVerbose($expected);
-
- $this->assertSame($same, $this->object);
- $this->assertTrue($this->object->isVerbose());
- }
-
- // setEnv()
-
- /**
- * @test
- */
- public function shouldSetEnv()
- {
- $expected = 'myenv';
-
- $same = $this->object->setEnv($expected);
-
- $this->assertSame($same, $this->object);
- $this->assertSame($expected, $this->object->getEnv());
- }
-}
diff --git a/vendor/php-coveralls/php-coveralls/tests/Satooshi/Bundle/CoverallsV1Bundle/Config/ConfiguratorTest.php b/vendor/php-coveralls/php-coveralls/tests/Satooshi/Bundle/CoverallsV1Bundle/Config/ConfiguratorTest.php
deleted file mode 100644
index 388bd151c10..00000000000
--- a/vendor/php-coveralls/php-coveralls/tests/Satooshi/Bundle/CoverallsV1Bundle/Config/ConfiguratorTest.php
+++ /dev/null
@@ -1,356 +0,0 @@
-
- */
-class ConfiguratorTest extends ProjectTestCase
-{
- protected function setUp()
- {
- $this->projectDir = realpath(__DIR__ . '/../../../..');
-
- $this->setUpDir($this->projectDir);
-
- $this->srcDir = $this->rootDir . '/src';
-
- $this->object = new Configurator();
- }
-
- protected function tearDown()
- {
- $this->rmFile($this->cloverXmlPath);
- $this->rmFile($this->cloverXmlPath1);
- $this->rmFile($this->cloverXmlPath2);
- $this->rmFile($this->jsonPath);
- $this->rmDir($this->srcDir);
- $this->rmDir($this->logsDir);
- $this->rmDir($this->buildDir);
- }
-
- // custom assertion
-
- protected function assertConfiguration(Configuration $config, array $cloverXml, $jsonPath, $excludeNoStatements = false)
- {
- $this->assertSame($cloverXml, $config->getCloverXmlPaths());
- $this->assertSame($jsonPath, $config->getJsonPath());
- $this->assertSame($excludeNoStatements, $config->isExcludeNoStatements());
- }
-
- // load()
-
- /**
- * @test
- */
- public function shouldLoadNonExistingYml()
- {
- $this->makeProjectDir($this->srcDir, $this->logsDir, $this->cloverXmlPath);
-
- $path = realpath(__DIR__ . '/yaml/dummy.yml');
-
- $config = $this->object->load($path, $this->rootDir);
-
- $this->assertConfiguration($config, array($this->cloverXmlPath), $this->jsonPath);
- }
-
- // default src_dir not found, it doesn't throw anything now, as src_dir is not required for configuration
-
- /**
- * @test
- */
- public function loadConfigurationOnLoadEmptyYmlWhenSrcDirNotFound()
- {
- $this->makeProjectDir(null, $this->logsDir, $this->cloverXmlPath);
-
- $path = realpath(__DIR__ . '/yaml/dummy.yml');
-
- $config = $this->object->load($path, $this->rootDir);
-
- $this->assertInstanceOf('Satooshi\Bundle\CoverallsV1Bundle\Config\Configuration', $config);
- }
-
- // default coverage_clover not found
-
- /**
- * @test
- * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException
- */
- public function throwInvalidConfigurationExceptionOnLoadEmptyYmlIfCoverageCloverNotFound()
- {
- $this->makeProjectDir($this->srcDir, $this->logsDir, null);
-
- $path = realpath(__DIR__ . '/yaml/dummy.yml');
-
- $this->object->load($path, $this->rootDir);
- }
-
- // default json_path not writable
-
- /**
- * @test
- * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException
- */
- public function throwInvalidConfigurationExceptionOnLoadEmptyYmlIfJsonPathDirNotWritable()
- {
- $this->makeProjectDir($this->srcDir, $this->logsDir, $this->cloverXmlPath, true);
-
- $path = realpath(__DIR__ . '/yaml/dummy.yml');
-
- $this->object->load($path, $this->rootDir);
- }
-
- /**
- * @test
- * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException
- */
- public function throwInvalidConfigurationExceptionOnLoadEmptyYmlIfJsonPathNotWritable()
- {
- $this->makeProjectDir($this->srcDir, $this->logsDir, $this->cloverXmlPath, false, true);
-
- $path = realpath(__DIR__ . '/yaml/dummy.yml');
-
- $this->object->load($path, $this->rootDir);
- }
-
- // no configuration
-
- /**
- * @test
- */
- public function shouldLoadEmptyYml()
- {
- $this->makeProjectDir($this->srcDir, $this->logsDir, $this->cloverXmlPath);
-
- $path = realpath(__DIR__ . '/yaml/empty.yml');
-
- $config = $this->object->load($path, $this->rootDir);
-
- $this->assertConfiguration($config, array($this->cloverXmlPath), $this->jsonPath);
- }
-
- // load default value yml
-
- /**
- * @test
- * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException
- */
- public function shouldThrowInvalidConfigurationExceptionUponLoadingSrcDirYml()
- {
- $this->makeProjectDir($this->srcDir, $this->logsDir, $this->cloverXmlPath);
-
- $path = realpath(__DIR__ . '/yaml/src_dir.yml');
-
- $config = $this->object->load($path, $this->rootDir);
- }
-
- /**
- * @test
- */
- public function shouldLoadCoverageCloverYmlContainingDefaultValue()
- {
- $this->makeProjectDir($this->srcDir, $this->logsDir, $this->cloverXmlPath);
-
- $path = realpath(__DIR__ . '/yaml/coverage_clover.yml');
-
- $config = $this->object->load($path, $this->rootDir);
-
- $this->assertConfiguration($config, array($this->cloverXmlPath), $this->jsonPath);
- }
-
- /**
- * @test
- */
- public function shouldLoadCoverageCloverOverriddenByInput()
- {
- $this->makeProjectDir($this->srcDir, $this->logsDir, array($this->cloverXmlPath1, $this->cloverXmlPath2));
-
- $path = realpath(__DIR__ . '/yaml/coverage_clover.yml');
-
- // Mocking command line options.
- $defs = new InputDefinition(
- array(
- new InputOption(
- 'coverage_clover',
- 'x',
- InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY
- ),
- )
- );
- $inputArray = array(
- '--coverage_clover' => array(
- 'build/logs/clover-part1.xml',
- 'build/logs/clover-part2.xml',
- ),
- );
- $input = new ArrayInput($inputArray, $defs);
- $config = $this->object->load($path, $this->rootDir, $input);
- $this->assertConfiguration($config, array($this->cloverXmlPath1, $this->cloverXmlPath2), $this->jsonPath);
- }
-
- /**
- * @test
- */
- public function shouldLoadCoverageCloverYmlContainingGlobValue()
- {
- $this->makeProjectDir($this->srcDir, $this->logsDir, array($this->cloverXmlPath1, $this->cloverXmlPath2));
-
- $path = realpath(__DIR__ . '/yaml/coverage_clover_glob.yml');
-
- $config = $this->object->load($path, $this->rootDir);
-
- $this->assertConfiguration($config, array($this->cloverXmlPath1, $this->cloverXmlPath2), $this->jsonPath);
- }
-
- /**
- * @test
- */
- public function shouldLoadCoverageCloverYmlContainingArrayValue()
- {
- $this->makeProjectDir($this->srcDir, $this->logsDir, array($this->cloverXmlPath1, $this->cloverXmlPath2));
-
- $path = realpath(__DIR__ . '/yaml/coverage_clover_array.yml');
-
- $config = $this->object->load($path, $this->rootDir);
-
- $this->assertConfiguration($config, array($this->cloverXmlPath1, $this->cloverXmlPath2), $this->jsonPath);
- }
-
- /**
- * @test
- */
- public function shouldLoadJsonPathYmlContainingDefaultValue()
- {
- $this->makeProjectDir($this->srcDir, $this->logsDir, $this->cloverXmlPath);
-
- $path = realpath(__DIR__ . '/yaml/json_path.yml');
-
- $config = $this->object->load($path, $this->rootDir);
-
- $this->assertConfiguration($config, array($this->cloverXmlPath), $this->jsonPath);
- }
-
- /**
- * @test
- */
- public function shouldLoadJsonPathOverriddenByInput()
- {
- $this->makeProjectDir($this->srcDir, $this->logsDir, $this->cloverXmlPath);
-
- $path = realpath(__DIR__ . '/yaml/json_path.yml');
-
- // Mocking command line options.
- $defs = new InputDefinition(
- array(
- new InputOption(
- 'json_path',
- 'o',
- InputOption::VALUE_REQUIRED
- ),
- )
- );
-
- $inputArray = array(
- '--json_path' => 'build/logs/coveralls-upload-custom.json',
- );
- $expectedJsonPath = substr($this->jsonPath, 0, strlen($this->jsonPath) - 5) . '-custom.json';
-
- $input = new ArrayInput($inputArray, $defs);
- $config = $this->object->load($path, $this->rootDir, $input);
- $this->assertConfiguration($config, array($this->cloverXmlPath), $expectedJsonPath);
- }
-
- /**
- * @test
- */
- public function shouldLoadExcludeNoStmtYmlContainingTrue()
- {
- $this->makeProjectDir($this->srcDir, $this->logsDir, $this->cloverXmlPath);
-
- $path = realpath(__DIR__ . '/yaml/exclude_no_stmt_true.yml');
-
- $config = $this->object->load($path, $this->rootDir);
-
- $this->assertConfiguration($config, array($this->cloverXmlPath), $this->jsonPath, true);
- }
-
- /**
- * @test
- */
- public function shouldLoadExcludeNoStmtYmlContainingFalse()
- {
- $this->makeProjectDir($this->srcDir, $this->logsDir, $this->cloverXmlPath);
-
- $path = realpath(__DIR__ . '/yaml/exclude_no_stmt_false.yml');
-
- $config = $this->object->load($path, $this->rootDir);
-
- $this->assertConfiguration($config, array($this->cloverXmlPath), $this->jsonPath, false);
- }
-
- // configured coverage_clover not found
-
- /**
- * @test
- * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException
- */
- public function throwInvalidConfigurationExceptionOnLoadCoverageCloverYmlIfCoverageCloverNotFound()
- {
- $this->makeProjectDir($this->srcDir, $this->logsDir, $this->cloverXmlPath);
-
- $path = realpath(__DIR__ . '/yaml/coverage_clover_not_found.yml');
-
- $this->object->load($path, $this->rootDir);
- }
-
- /**
- * @test
- * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException
- */
- public function throwInvalidConfigurationExceptionOnLoadCoverageCloverYmlIfCoverageCloverIsNotString()
- {
- $this->makeProjectDir($this->srcDir, $this->logsDir, $this->cloverXmlPath);
-
- $path = realpath(__DIR__ . '/yaml/coverage_clover_invalid.yml');
-
- $this->object->load($path, $this->rootDir);
- }
-
- // configured json_path not found
-
- /**
- * @test
- * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException
- */
- public function throwInvalidConfigurationExceptionOnLoadJsonPathYmlIfJsonPathNotFound()
- {
- $this->makeProjectDir($this->srcDir, $this->logsDir, $this->cloverXmlPath);
-
- $path = realpath(__DIR__ . '/yaml/json_path_not_found.yml');
-
- $this->object->load($path, $this->rootDir);
- }
-
- // configured exclude_no_stmt invalid
-
- /**
- * @test
- * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException
- */
- public function throwInvalidConfigurationExceptionOnLoadExcludeNoStmtYmlIfInvalid()
- {
- $this->makeProjectDir($this->srcDir, $this->logsDir, $this->cloverXmlPath);
-
- $path = realpath(__DIR__ . '/yaml/exclude_no_stmt_invalid.yml');
-
- $this->object->load($path, $this->rootDir);
- }
-}
diff --git a/vendor/php-coveralls/php-coveralls/tests/Satooshi/Bundle/CoverallsV1Bundle/Config/yaml/coverage_clover.yml b/vendor/php-coveralls/php-coveralls/tests/Satooshi/Bundle/CoverallsV1Bundle/Config/yaml/coverage_clover.yml
deleted file mode 100644
index f6e9ef4cf0d..00000000000
--- a/vendor/php-coveralls/php-coveralls/tests/Satooshi/Bundle/CoverallsV1Bundle/Config/yaml/coverage_clover.yml
+++ /dev/null
@@ -1 +0,0 @@
-coverage_clover: build/logs/clover.xml
diff --git a/vendor/php-coveralls/php-coveralls/tests/Satooshi/Bundle/CoverallsV1Bundle/Config/yaml/coverage_clover_array.yml b/vendor/php-coveralls/php-coveralls/tests/Satooshi/Bundle/CoverallsV1Bundle/Config/yaml/coverage_clover_array.yml
deleted file mode 100644
index 721b36e1bc4..00000000000
--- a/vendor/php-coveralls/php-coveralls/tests/Satooshi/Bundle/CoverallsV1Bundle/Config/yaml/coverage_clover_array.yml
+++ /dev/null
@@ -1,3 +0,0 @@
-coverage_clover:
- - build/logs/clover-part1.xml
- - build/logs/clover-part2.xml
diff --git a/vendor/php-coveralls/php-coveralls/tests/Satooshi/Bundle/CoverallsV1Bundle/Config/yaml/coverage_clover_glob.yml b/vendor/php-coveralls/php-coveralls/tests/Satooshi/Bundle/CoverallsV1Bundle/Config/yaml/coverage_clover_glob.yml
deleted file mode 100644
index c8f7bd3d507..00000000000
--- a/vendor/php-coveralls/php-coveralls/tests/Satooshi/Bundle/CoverallsV1Bundle/Config/yaml/coverage_clover_glob.yml
+++ /dev/null
@@ -1 +0,0 @@
-coverage_clover: build/logs/clover-*.xml
diff --git a/vendor/php-coveralls/php-coveralls/tests/Satooshi/Bundle/CoverallsV1Bundle/Config/yaml/coverage_clover_invalid.yml b/vendor/php-coveralls/php-coveralls/tests/Satooshi/Bundle/CoverallsV1Bundle/Config/yaml/coverage_clover_invalid.yml
deleted file mode 100644
index bb3506d8fe9..00000000000
--- a/vendor/php-coveralls/php-coveralls/tests/Satooshi/Bundle/CoverallsV1Bundle/Config/yaml/coverage_clover_invalid.yml
+++ /dev/null
@@ -1 +0,0 @@
-coverage_clover: false
diff --git a/vendor/php-coveralls/php-coveralls/tests/Satooshi/Bundle/CoverallsV1Bundle/Config/yaml/coverage_clover_not_found.yml b/vendor/php-coveralls/php-coveralls/tests/Satooshi/Bundle/CoverallsV1Bundle/Config/yaml/coverage_clover_not_found.yml
deleted file mode 100644
index f1113242a67..00000000000
--- a/vendor/php-coveralls/php-coveralls/tests/Satooshi/Bundle/CoverallsV1Bundle/Config/yaml/coverage_clover_not_found.yml
+++ /dev/null
@@ -1 +0,0 @@
-coverage_clover: build/logs/clover.dummy.xml
diff --git a/vendor/php-coveralls/php-coveralls/tests/Satooshi/Bundle/CoverallsV1Bundle/Config/yaml/empty.yml b/vendor/php-coveralls/php-coveralls/tests/Satooshi/Bundle/CoverallsV1Bundle/Config/yaml/empty.yml
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/vendor/php-coveralls/php-coveralls/tests/Satooshi/Bundle/CoverallsV1Bundle/Config/yaml/exclude_no_stmt_false.yml b/vendor/php-coveralls/php-coveralls/tests/Satooshi/Bundle/CoverallsV1Bundle/Config/yaml/exclude_no_stmt_false.yml
deleted file mode 100644
index 0c411829ab5..00000000000
--- a/vendor/php-coveralls/php-coveralls/tests/Satooshi/Bundle/CoverallsV1Bundle/Config/yaml/exclude_no_stmt_false.yml
+++ /dev/null
@@ -1 +0,0 @@
-exclude_no_stmt: false
diff --git a/vendor/php-coveralls/php-coveralls/tests/Satooshi/Bundle/CoverallsV1Bundle/Config/yaml/exclude_no_stmt_invalid.yml b/vendor/php-coveralls/php-coveralls/tests/Satooshi/Bundle/CoverallsV1Bundle/Config/yaml/exclude_no_stmt_invalid.yml
deleted file mode 100644
index 54d20fcad02..00000000000
--- a/vendor/php-coveralls/php-coveralls/tests/Satooshi/Bundle/CoverallsV1Bundle/Config/yaml/exclude_no_stmt_invalid.yml
+++ /dev/null
@@ -1 +0,0 @@
-exclude_no_stmt: 1
diff --git a/vendor/php-coveralls/php-coveralls/tests/Satooshi/Bundle/CoverallsV1Bundle/Config/yaml/exclude_no_stmt_true.yml b/vendor/php-coveralls/php-coveralls/tests/Satooshi/Bundle/CoverallsV1Bundle/Config/yaml/exclude_no_stmt_true.yml
deleted file mode 100644
index c1c4d345e12..00000000000
--- a/vendor/php-coveralls/php-coveralls/tests/Satooshi/Bundle/CoverallsV1Bundle/Config/yaml/exclude_no_stmt_true.yml
+++ /dev/null
@@ -1 +0,0 @@
-exclude_no_stmt: true
diff --git a/vendor/php-coveralls/php-coveralls/tests/Satooshi/Bundle/CoverallsV1Bundle/Config/yaml/json_path.yml b/vendor/php-coveralls/php-coveralls/tests/Satooshi/Bundle/CoverallsV1Bundle/Config/yaml/json_path.yml
deleted file mode 100644
index 092f4ee1acf..00000000000
--- a/vendor/php-coveralls/php-coveralls/tests/Satooshi/Bundle/CoverallsV1Bundle/Config/yaml/json_path.yml
+++ /dev/null
@@ -1 +0,0 @@
-json_path: build/logs/coveralls-upload.json
diff --git a/vendor/php-coveralls/php-coveralls/tests/Satooshi/Bundle/CoverallsV1Bundle/Config/yaml/json_path_not_found.yml b/vendor/php-coveralls/php-coveralls/tests/Satooshi/Bundle/CoverallsV1Bundle/Config/yaml/json_path_not_found.yml
deleted file mode 100644
index e4ad72c692a..00000000000
--- a/vendor/php-coveralls/php-coveralls/tests/Satooshi/Bundle/CoverallsV1Bundle/Config/yaml/json_path_not_found.yml
+++ /dev/null
@@ -1 +0,0 @@
-json_path: build/logs.dummy/coveralls-upload.json
diff --git a/vendor/php-coveralls/php-coveralls/tests/Satooshi/Bundle/CoverallsV1Bundle/Config/yaml/src_dir.yml b/vendor/php-coveralls/php-coveralls/tests/Satooshi/Bundle/CoverallsV1Bundle/Config/yaml/src_dir.yml
deleted file mode 100644
index 7a18ce2e629..00000000000
--- a/vendor/php-coveralls/php-coveralls/tests/Satooshi/Bundle/CoverallsV1Bundle/Config/yaml/src_dir.yml
+++ /dev/null
@@ -1 +0,0 @@
-src_dir: src
diff --git a/vendor/php-coveralls/php-coveralls/tests/Satooshi/Bundle/CoverallsV1Bundle/Entity/Exception/RequirementsNotSatisfiedExceptionTest.php b/vendor/php-coveralls/php-coveralls/tests/Satooshi/Bundle/CoverallsV1Bundle/Entity/Exception/RequirementsNotSatisfiedExceptionTest.php
deleted file mode 100644
index bbae189a48d..00000000000
--- a/vendor/php-coveralls/php-coveralls/tests/Satooshi/Bundle/CoverallsV1Bundle/Entity/Exception/RequirementsNotSatisfiedExceptionTest.php
+++ /dev/null
@@ -1,133 +0,0 @@
-
- */
-class RequirementsNotSatisfiedExceptionTest extends \PHPUnit\Framework\TestCase
-{
- // getReadEnv()
-
- /**
- * @test
- */
- public function shouldNotHaveReadEnvOnConstruction()
- {
- $object = new RequirementsNotSatisfiedException();
-
- $this->assertNull($object->getReadEnv());
- }
-
- // setReadEnv()
-
- /**
- * @test
- */
- public function shouldSetReadEnv()
- {
- $expected = array(
- 'ENV_NAME' => 'value',
- );
-
- $object = new RequirementsNotSatisfiedException();
- $object->setReadEnv($expected);
-
- $this->assertSame($expected, $object->getReadEnv());
- }
-
- // getHelpMessage()
-
- /**
- * @test
- */
- public function shouldGetHelpMessageWithStringEnvVar()
- {
- $expected = array(
- 'ENV_NAME' => 'value',
- );
-
- $object = new RequirementsNotSatisfiedException();
- $object->setReadEnv($expected);
-
- $message = $object->getHelpMessage();
-
- $this->assertContains(" - ENV_NAME='value'", $message);
- }
-
- // getHelpMessage()
-
- /**
- * @test
- */
- public function shouldGetHelpMessageWithSecretStringEnvVarHidden()
- {
- // Make sure the secret repo token is HIDDEN.
- $env = array(
- 'COVERALLS_REPO_TOKEN' => 'secret',
- );
- $expected = " - COVERALLS_REPO_TOKEN='********(HIDDEN)'";
-
- $object = new RequirementsNotSatisfiedException();
- $object->setReadEnv($env);
-
- $message = $object->getHelpMessage();
-
- $this->assertContains($expected, $message);
- }
-
- /**
- * @test
- */
- public function shouldGetHelpMessageWithSecretEmptyStringEnvVarShown()
- {
- // Make sure the secret repo token is shown when it's empty.
- $env = array(
- 'COVERALLS_REPO_TOKEN' => '',
- );
- $expected = " - COVERALLS_REPO_TOKEN=''";
-
- $object = new RequirementsNotSatisfiedException();
- $object->setReadEnv($env);
-
- $message = $object->getHelpMessage();
-
- $this->assertContains($expected, $message);
- }
-
- /**
- * @test
- */
- public function shouldGetHelpMessageWithIntegerEnvVar()
- {
- $expected = array(
- 'ENV_NAME' => 123,
- );
-
- $object = new RequirementsNotSatisfiedException();
- $object->setReadEnv($expected);
-
- $message = $object->getHelpMessage();
-
- $this->assertContains(' - ENV_NAME=123', $message);
- }
-
- /**
- * @test
- */
- public function shouldGetHelpMessageWithBooleanEnvVar()
- {
- $expected = array(
- 'ENV_NAME' => true,
- );
-
- $object = new RequirementsNotSatisfiedException();
- $object->setReadEnv($expected);
-
- $message = $object->getHelpMessage();
-
- $this->assertContains(' - ENV_NAME=true', $message);
- }
-}
diff --git a/vendor/php-coveralls/php-coveralls/tests/Satooshi/Bundle/CoverallsV1Bundle/Entity/Git/CommitTest.php b/vendor/php-coveralls/php-coveralls/tests/Satooshi/Bundle/CoverallsV1Bundle/Entity/Git/CommitTest.php
deleted file mode 100644
index afb7d3ff623..00000000000
--- a/vendor/php-coveralls/php-coveralls/tests/Satooshi/Bundle/CoverallsV1Bundle/Entity/Git/CommitTest.php
+++ /dev/null
@@ -1,220 +0,0 @@
-
- */
-class CommitTest extends \PHPUnit\Framework\TestCase
-{
- protected function setUp()
- {
- $this->object = new Commit();
- }
-
- // getId()
-
- /**
- * @test
- */
- public function shouldNotHaveIdOnConstruction()
- {
- $this->assertNull($this->object->getId());
- }
-
- // getAuthorName()
-
- /**
- * @test
- */
- public function shouldNotHoveAuthorNameOnConstruction()
- {
- $this->assertNull($this->object->getAuthorName());
- }
-
- // getAuthorEmail()
-
- /**
- * @test
- */
- public function shouldNotHoveAuthorEmailOnConstruction()
- {
- $this->assertNull($this->object->getAuthorEmail());
- }
-
- // getCommitterName()
-
- /**
- * @test
- */
- public function shouldNotHoveCommitterNameOnConstruction()
- {
- $this->assertNull($this->object->getCommitterName());
- }
-
- // getCommitterEmail()
-
- /**
- * @test
- */
- public function shouldNotHoveCommitterEmailOnConstruction()
- {
- $this->assertNull($this->object->getCommitterEmail());
- }
-
- // getMessage()
-
- /**
- * @test
- */
- public function shouldNotHoveMessageOnConstruction()
- {
- $this->assertNull($this->object->getMessage());
- }
-
- // setId()
-
- /**
- * @test
- */
- public function shouldSetId()
- {
- $expected = 'id';
-
- $obj = $this->object->setId($expected);
-
- $this->assertSame($expected, $this->object->getId());
- $this->assertSame($obj, $this->object);
- }
-
- // setAuthorName()
-
- /**
- * @test
- */
- public function shouldSetAuthorName()
- {
- $expected = 'author_name';
-
- $obj = $this->object->setAuthorName($expected);
-
- $this->assertSame($expected, $this->object->getAuthorName());
- $this->assertSame($obj, $this->object);
- }
-
- // setAuthorEmail()
-
- /**
- * @test
- */
- public function shouldSetAuthorEmail()
- {
- $expected = 'author_email';
-
- $obj = $this->object->setAuthorEmail($expected);
-
- $this->assertSame($expected, $this->object->getAuthorEmail());
- $this->assertSame($obj, $this->object);
- }
-
- // setCommitterName()
-
- /**
- * @test
- */
- public function shouldSetCommitterName()
- {
- $expected = 'committer_name';
-
- $obj = $this->object->setCommitterName($expected);
-
- $this->assertSame($expected, $this->object->getCommitterName());
- $this->assertSame($obj, $this->object);
- }
-
- // setCommitterEmail()
-
- /**
- * @test
- */
- public function shouldSetCommitterEmail()
- {
- $expected = 'committer_email';
-
- $obj = $this->object->setCommitterEmail($expected);
-
- $this->assertSame($expected, $this->object->getCommitterEmail());
- $this->assertSame($obj, $this->object);
- }
-
- // setMessage()
-
- /**
- * @test
- */
- public function shouldSetMessage()
- {
- $expected = 'message';
-
- $obj = $this->object->setMessage($expected);
-
- $this->assertSame($expected, $this->object->getMessage());
- $this->assertSame($obj, $this->object);
- }
-
- // toArray()
-
- /**
- * @test
- */
- public function shouldConvertToArray()
- {
- $expected = array(
- 'id' => null,
- 'author_name' => null,
- 'author_email' => null,
- 'committer_name' => null,
- 'committer_email' => null,
- 'message' => null,
- );
-
- $this->assertSame($expected, $this->object->toArray());
- $this->assertSame(json_encode($expected), (string) $this->object);
- }
-
- /**
- * @test
- */
- public function shouldConvertToFilledArray()
- {
- $id = 'id';
- $authorName = 'author_name';
- $authorEmail = 'author_email';
- $committerName = 'committer_name';
- $committerEmail = 'committer_email';
- $message = 'message';
-
- $this->object
- ->setId($id)
- ->setAuthorName($authorName)
- ->setAuthorEmail($authorEmail)
- ->setCommitterName($committerName)
- ->setCommitterEmail($committerEmail)
- ->setMessage($message);
-
- $expected = array(
- 'id' => $id,
- 'author_name' => $authorName,
- 'author_email' => $authorEmail,
- 'committer_name' => $committerName,
- 'committer_email' => $committerEmail,
- 'message' => $message,
- );
-
- $this->assertSame($expected, $this->object->toArray());
- $this->assertSame(json_encode($expected), (string) $this->object);
- }
-}
diff --git a/vendor/php-coveralls/php-coveralls/tests/Satooshi/Bundle/CoverallsV1Bundle/Entity/Git/GitTest.php b/vendor/php-coveralls/php-coveralls/tests/Satooshi/Bundle/CoverallsV1Bundle/Entity/Git/GitTest.php
deleted file mode 100644
index b20cc899d38..00000000000
--- a/vendor/php-coveralls/php-coveralls/tests/Satooshi/Bundle/CoverallsV1Bundle/Entity/Git/GitTest.php
+++ /dev/null
@@ -1,90 +0,0 @@
-
- */
-class GitTest extends \PHPUnit\Framework\TestCase
-{
- protected function setUp()
- {
- $this->branchName = 'branch_name';
- $this->commit = $this->createCommit();
- $this->remote = $this->createRemote();
-
- $this->object = new Git($this->branchName, $this->commit, array($this->remote));
- }
-
- protected function createRemote($name = 'name', $url = 'url')
- {
- $remote = new Remote();
-
- return $remote
- ->setName($name)
- ->setUrl($url);
- }
-
- protected function createCommit($id = 'id', $authorName = 'author_name', $authorEmail = 'author_email', $committerName = 'committer_name', $committerEmail = 'committer_email', $message = 'message')
- {
- $commit = new Commit();
-
- return $commit
- ->setId($id)
- ->setAuthorName($authorName)
- ->setAuthorEmail($authorEmail)
- ->setCommitterName($committerName)
- ->setCommitterEmail($committerEmail)
- ->setMessage($message);
- }
-
- // getBranch()
-
- /**
- * @test
- */
- public function shouldHaveBranchNameOnConstruction()
- {
- $this->assertSame($this->branchName, $this->object->getBranch());
- }
-
- // getHead()
-
- /**
- * @test
- */
- public function shouldHaveHeadCommitOnConstruction()
- {
- $this->assertSame($this->commit, $this->object->getHead());
- }
-
- // getRemotes()
-
- /**
- * @test
- */
- public function shouldHaveRemotesOnConstruction()
- {
- $this->assertSame(array($this->remote), $this->object->getRemotes());
- }
-
- // toArray()
-
- /**
- * @test
- */
- public function shouldConvertToArray()
- {
- $expected = array(
- 'branch' => $this->branchName,
- 'head' => $this->commit->toArray(),
- 'remotes' => array($this->remote->toArray()),
- );
-
- $this->assertSame($expected, $this->object->toArray());
- $this->assertSame(json_encode($expected), (string) $this->object);
- }
-}
diff --git a/vendor/php-coveralls/php-coveralls/tests/Satooshi/Bundle/CoverallsV1Bundle/Entity/Git/RemoteTest.php b/vendor/php-coveralls/php-coveralls/tests/Satooshi/Bundle/CoverallsV1Bundle/Entity/Git/RemoteTest.php
deleted file mode 100644
index 706c381103b..00000000000
--- a/vendor/php-coveralls/php-coveralls/tests/Satooshi/Bundle/CoverallsV1Bundle/Entity/Git/RemoteTest.php
+++ /dev/null
@@ -1,104 +0,0 @@
-
- */
-class RemoteTest extends \PHPUnit\Framework\TestCase
-{
- protected function setUp()
- {
- $this->object = new Remote();
- }
-
- // getName()
-
- /**
- * @test
- */
- public function shouldNotHaveRemoteNameOnConstruction()
- {
- $this->assertNull($this->object->getName());
- }
-
- // getUrl()
-
- /**
- * @test
- */
- public function shouldNotHaveUrlOnConstruction()
- {
- $this->assertNull($this->object->getUrl());
- }
-
- // setName()
-
- /**
- * @test
- */
- public function shouldSetRemoteName()
- {
- $expected = 'remote_name';
-
- $obj = $this->object->setName($expected);
-
- $this->assertSame($expected, $this->object->getName());
- $this->assertSame($obj, $this->object);
- }
-
- // setUrl()
-
- /**
- * @test
- */
- public function shouldSetRemoteUrl()
- {
- $expected = 'git@github.com:php-coveralls/php-coveralls.git';
-
- $obj = $this->object->setUrl($expected);
-
- $this->assertSame($expected, $this->object->getUrl());
- $this->assertSame($obj, $this->object);
- }
-
- // toArray()
-
- /**
- * @test
- */
- public function shouldConvertToArray()
- {
- $expected = array(
- 'name' => null,
- 'url' => null,
- );
-
- $this->assertSame($expected, $this->object->toArray());
- $this->assertSame(json_encode($expected), (string) $this->object);
- }
-
- /**
- * @test
- */
- public function shouldConvertToFilledArray()
- {
- $name = 'name';
- $url = 'url';
-
- $this->object
- ->setName($name)
- ->setUrl($url);
-
- $expected = array(
- 'name' => $name,
- 'url' => $url,
- );
-
- $this->assertSame($expected, $this->object->toArray());
- $this->assertSame(json_encode($expected), (string) $this->object);
- }
-}
diff --git a/vendor/php-coveralls/php-coveralls/tests/Satooshi/Bundle/CoverallsV1Bundle/Entity/JsonFileTest.php b/vendor/php-coveralls/php-coveralls/tests/Satooshi/Bundle/CoverallsV1Bundle/Entity/JsonFileTest.php
deleted file mode 100644
index a53f759bebe..00000000000
--- a/vendor/php-coveralls/php-coveralls/tests/Satooshi/Bundle/CoverallsV1Bundle/Entity/JsonFileTest.php
+++ /dev/null
@@ -1,734 +0,0 @@
-
- */
-class JsonFileTest extends ProjectTestCase
-{
- protected function setUp()
- {
- $this->projectDir = realpath(__DIR__ . '/../../../..');
-
- $this->setUpDir($this->projectDir);
-
- $this->object = new JsonFile();
- }
-
- protected function createSourceFile()
- {
- $filename = 'test.php';
- $path = $this->srcDir . DIRECTORY_SEPARATOR . $filename;
-
- return new SourceFile($path, $filename);
- }
-
- protected function getCloverXml()
- {
- $xml = <<<'XML'
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-XML;
-
- return sprintf($xml, $this->srcDir, $this->srcDir, $this->srcDir, $this->srcDir);
- }
-
- protected function createCloverXml()
- {
- $xml = $this->getCloverXml();
-
- return simplexml_load_string($xml);
- }
-
- protected function collectJsonFile()
- {
- $xml = $this->createCloverXml();
- $collector = new CloverXmlCoverageCollector();
-
- return $collector->collect($xml, $this->srcDir);
- }
-
- protected function getNoSourceCloverXml()
- {
- return <<<'XML'
-
-
-
-
-
-
-
-
-
-
-
-
-XML;
- }
-
- protected function createNoSourceCloverXml()
- {
- $xml = $this->getNoSourceCloverXml();
-
- return simplexml_load_string($xml);
- }
-
- protected function collectJsonFileWithoutSourceFiles()
- {
- $xml = $this->createNoSourceCloverXml();
- $collector = new CloverXmlCoverageCollector();
-
- return $collector->collect($xml, $this->srcDir);
- }
-
- // hasSourceFile()
- // getSourceFile()
-
- /**
- * @test
- */
- public function shouldNotHaveSourceFileOnConstruction()
- {
- $path = 'test.php';
-
- $this->assertFalse($this->object->hasSourceFile($path));
- $this->assertNull($this->object->getSourceFile($path));
- }
-
- // hasSourceFiles()
- // getSourceFiles()
-
- /**
- * @test
- */
- public function shouldCountZeroSourceFilesOnConstruction()
- {
- $this->assertFalse($this->object->hasSourceFiles());
- $this->assertEmpty($this->object->getSourceFiles());
- }
-
- // getServiceName()
-
- /**
- * @test
- */
- public function shouldNotHaveServiceNameOnConstruction()
- {
- $this->assertNull($this->object->getServiceName());
- }
-
- // getRepoToken()
-
- /**
- * @test
- */
- public function shouldNotHaveRepoTokenOnConstruction()
- {
- $this->assertNull($this->object->getRepoToken());
- }
-
- // getServiceJobId()
-
- /**
- * @test
- */
- public function shouldNotHaveServiceJobIdOnConstruction()
- {
- $this->assertNull($this->object->getServiceJobId());
- }
-
- // getServiceNumber()
-
- /**
- * @test
- */
- public function shouldNotHaveServiceNumberOnConstruction()
- {
- $this->assertNull($this->object->getServiceNumber());
- }
-
- // getServiceEventType()
-
- /**
- * @test
- */
- public function shouldNotHaveServiceEventTypeOnConstruction()
- {
- $this->assertNull($this->object->getServiceEventType());
- }
-
- // getServiceBuildUrl()
-
- /**
- * @test
- */
- public function shouldNotHaveServiceBuildUrlOnConstruction()
- {
- $this->assertNull($this->object->getServiceBuildUrl());
- }
-
- // getServiceBranch()
-
- /**
- * @test
- */
- public function shouldNotHaveServiceBranchOnConstruction()
- {
- $this->assertNull($this->object->getServiceBranch());
- }
-
- // getServicePullRequest()
-
- /**
- * @test
- */
- public function shouldNotHaveServicePullRequestOnConstruction()
- {
- $this->assertNull($this->object->getServicePullRequest());
- }
-
- // getGit()
-
- /**
- * @test
- */
- public function shouldNotHaveGitOnConstruction()
- {
- $this->assertNull($this->object->getGit());
- }
-
- // getRunAt()
-
- /**
- * @test
- */
- public function shouldNotHaveRunAtOnConstruction()
- {
- $this->assertNull($this->object->getRunAt());
- }
-
- // getMetrics()
-
- /**
- * @test
- */
- public function shouldHaveEmptyMetrics()
- {
- $metrics = $this->object->getMetrics();
-
- $this->assertSame(0, $metrics->getStatements());
- $this->assertSame(0, $metrics->getCoveredStatements());
- $this->assertSame(0, $metrics->getLineCoverage());
- }
-
- // setServiceName()
-
- /**
- * @test
- */
- public function shouldSetServiceName()
- {
- $expected = 'travis-ci';
-
- $obj = $this->object->setServiceName($expected);
-
- $this->assertSame($expected, $this->object->getServiceName());
- $this->assertSame($obj, $this->object);
-
- return $this->object;
- }
-
- // setRepoToken()
-
- /**
- * @test
- */
- public function shouldSetRepoToken()
- {
- $expected = 'token';
-
- $obj = $this->object->setRepoToken($expected);
-
- $this->assertSame($expected, $this->object->getRepoToken());
- $this->assertSame($obj, $this->object);
-
- return $this->object;
- }
-
- // setServiceJobId()
-
- /**
- * @test
- */
- public function shouldSetServiceJobId()
- {
- $expected = 'job_id';
-
- $obj = $this->object->setServiceJobId($expected);
-
- $this->assertSame($expected, $this->object->getServiceJobId());
- $this->assertSame($obj, $this->object);
-
- return $this->object;
- }
-
- // setGit()
-
- /**
- * @test
- */
- public function shouldSetGit()
- {
- $remotes = array(new Remote());
- $head = new Commit();
- $git = new Git('master', $head, $remotes);
-
- $obj = $this->object->setGit($git);
-
- $this->assertSame($git, $this->object->getGit());
- $this->assertSame($obj, $this->object);
-
- return $this->object;
- }
-
- // setRunAt()
-
- /**
- * @test
- */
- public function shouldSetRunAt()
- {
- $expected = '2013-04-04 11:22:33 +0900';
-
- $obj = $this->object->setRunAt($expected);
-
- $this->assertSame($expected, $this->object->getRunAt());
- $this->assertSame($obj, $this->object);
-
- return $this->object;
- }
-
- // addSourceFile()
- // sortSourceFiles()
-
- /**
- * @test
- */
- public function shouldAddSourceFile()
- {
- $sourceFile = $this->createSourceFile();
-
- $this->object->addSourceFile($sourceFile);
- $this->object->sortSourceFiles();
-
- $path = $sourceFile->getPath();
-
- $this->assertTrue($this->object->hasSourceFiles());
- $this->assertSame(array($path => $sourceFile), $this->object->getSourceFiles());
- $this->assertTrue($this->object->hasSourceFile($path));
- $this->assertSame($sourceFile, $this->object->getSourceFile($path));
- }
-
- // toArray()
-
- /**
- * @test
- */
- public function shouldConvertToArray()
- {
- $expected = array(
- 'source_files' => array(),
- 'environment' => array('packagist_version' => Version::VERSION),
- );
-
- $this->assertSame($expected, $this->object->toArray());
- $this->assertSame(json_encode($expected), (string) $this->object);
- }
-
- /**
- * @test
- */
- public function shouldConvertToArrayWithSourceFiles()
- {
- $sourceFile = $this->createSourceFile();
-
- $this->object->addSourceFile($sourceFile);
-
- $expected = array(
- 'source_files' => array($sourceFile->toArray()),
- 'environment' => array('packagist_version' => Version::VERSION),
- );
-
- $this->assertSame($expected, $this->object->toArray());
- $this->assertSame(json_encode($expected), (string) $this->object);
- }
-
- // service_name
-
- /**
- * @test
- * @depends shouldSetServiceName
- */
- public function shouldConvertToArrayWithServiceName($object)
- {
- $item = 'travis-ci';
-
- $expected = array(
- 'service_name' => $item,
- 'source_files' => array(),
- 'environment' => array('packagist_version' => Version::VERSION),
- );
-
- $this->assertSame($expected, $object->toArray());
- $this->assertSame(json_encode($expected), (string) $object);
- }
-
- // service_job_id
-
- /**
- * @test
- * @depends shouldSetServiceJobId
- */
- public function shouldConvertToArrayWithServiceJobId($object)
- {
- $item = 'job_id';
-
- $expected = array(
- 'service_job_id' => $item,
- 'source_files' => array(),
- 'environment' => array('packagist_version' => Version::VERSION),
- );
-
- $this->assertSame($expected, $object->toArray());
- $this->assertSame(json_encode($expected), (string) $object);
- }
-
- // repo_token
-
- /**
- * @test
- * @depends shouldSetRepoToken
- */
- public function shouldConvertToArrayWithRepoToken($object)
- {
- $item = 'token';
-
- $expected = array(
- 'repo_token' => $item,
- 'source_files' => array(),
- 'environment' => array('packagist_version' => Version::VERSION),
- );
-
- $this->assertSame($expected, $object->toArray());
- $this->assertSame(json_encode($expected), (string) $object);
- }
-
- // git
-
- /**
- * @test
- * @depends shouldSetGit
- */
- public function shouldConvertToArrayWithGit($object)
- {
- $remotes = array(new Remote());
- $head = new Commit();
- $git = new Git('master', $head, $remotes);
-
- $expected = array(
- 'git' => $git->toArray(),
- 'source_files' => array(),
- 'environment' => array('packagist_version' => Version::VERSION),
- );
-
- $this->assertSame($expected, $object->toArray());
- $this->assertSame(json_encode($expected), (string) $object);
- }
-
- // run_at
-
- /**
- * @test
- * @depends shouldSetRunAt
- */
- public function shouldConvertToArrayWithRunAt($object)
- {
- $item = '2013-04-04 11:22:33 +0900';
-
- $expected = array(
- 'run_at' => $item,
- 'source_files' => array(),
- 'environment' => array('packagist_version' => Version::VERSION),
- );
-
- $this->assertSame($expected, $object->toArray());
- $this->assertSame(json_encode($expected), (string) $object);
- }
-
- // fillJobs()
-
- /**
- * @test
- */
- public function shouldFillJobsForServiceJobId()
- {
- $serviceName = 'travis-ci';
- $serviceJobId = '1.1';
-
- $env = array();
- $env['CI_NAME'] = $serviceName;
- $env['CI_JOB_ID'] = $serviceJobId;
-
- $object = $this->collectJsonFile();
-
- $same = $object->fillJobs($env);
-
- $this->assertSame($same, $object);
- $this->assertSame($serviceName, $object->getServiceName());
- $this->assertSame($serviceJobId, $object->getServiceJobId());
- }
-
- /**
- * @test
- */
- public function shouldFillJobsForServiceNumber()
- {
- $repoToken = 'token';
- $serviceName = 'circleci';
- $serviceNumber = '123';
-
- $env = array();
- $env['COVERALLS_REPO_TOKEN'] = $repoToken;
- $env['CI_NAME'] = $serviceName;
- $env['CI_BUILD_NUMBER'] = $serviceNumber;
-
- $object = $this->collectJsonFile();
-
- $same = $object->fillJobs($env);
-
- $this->assertSame($same, $object);
- $this->assertSame($repoToken, $object->getRepoToken());
- $this->assertSame($serviceName, $object->getServiceName());
- $this->assertSame($serviceNumber, $object->getServiceNumber());
- }
-
- /**
- * @test
- */
- public function shouldFillJobsForStandardizedEnvVars()
- {
- /*
- * CI_NAME=codeship
- * CI_BUILD_NUMBER=108821
- * CI_BUILD_URL=https://www.codeship.io/projects/2777/builds/108821
- * CI_BRANCH=master
- * CI_PULL_REQUEST=false
- */
-
- $repoToken = 'token';
- $serviceName = 'codeship';
- $serviceNumber = '108821';
- $serviceBuildUrl = 'https://www.codeship.io/projects/2777/builds/108821';
- $serviceBranch = 'master';
- $servicePullRequest = 'false';
-
- $env = array();
- $env['COVERALLS_REPO_TOKEN'] = $repoToken;
- $env['CI_NAME'] = $serviceName;
- $env['CI_BUILD_NUMBER'] = $serviceNumber;
- $env['CI_BUILD_URL'] = $serviceBuildUrl;
- $env['CI_BRANCH'] = $serviceBranch;
- $env['CI_PULL_REQUEST'] = $servicePullRequest;
-
- $object = $this->collectJsonFile();
-
- $same = $object->fillJobs($env);
-
- $this->assertSame($same, $object);
- $this->assertSame($repoToken, $object->getRepoToken());
- $this->assertSame($serviceName, $object->getServiceName());
- $this->assertSame($serviceNumber, $object->getServiceNumber());
- $this->assertSame($serviceBuildUrl, $object->getServiceBuildUrl());
- $this->assertSame($serviceBranch, $object->getServiceBranch());
- $this->assertSame($servicePullRequest, $object->getServicePullRequest());
- }
-
- /**
- * @test
- */
- public function shouldFillJobsForServiceEventType()
- {
- $repoToken = 'token';
- $serviceName = 'php-coveralls';
- $serviceEventType = 'manual';
-
- $env = array();
- $env['COVERALLS_REPO_TOKEN'] = $repoToken;
- $env['COVERALLS_RUN_LOCALLY'] = '1';
- $env['COVERALLS_EVENT_TYPE'] = $serviceEventType;
- $env['CI_NAME'] = $serviceName;
-
- $object = $this->collectJsonFile();
-
- $same = $object->fillJobs($env);
-
- $this->assertSame($same, $object);
- $this->assertSame($repoToken, $object->getRepoToken());
- $this->assertSame($serviceName, $object->getServiceName());
- $this->assertNull($object->getServiceJobId());
- $this->assertSame($serviceEventType, $object->getServiceEventType());
- }
-
- /**
- * @test
- */
- public function shouldFillJobsForUnsupportedJob()
- {
- $repoToken = 'token';
-
- $env = array();
- $env['COVERALLS_REPO_TOKEN'] = $repoToken;
-
- $object = $this->collectJsonFile();
-
- $same = $object->fillJobs($env);
-
- $this->assertSame($same, $object);
- $this->assertSame($repoToken, $object->getRepoToken());
- }
-
- /**
- * @test
- * @expectedException \Satooshi\Bundle\CoverallsV1Bundle\Entity\Exception\RequirementsNotSatisfiedException
- */
- public function throwRuntimeExceptionOnFillingJobsIfInvalidEnv()
- {
- $env = array();
-
- $object = $this->collectJsonFile();
-
- $object->fillJobs($env);
- }
-
- /**
- * @test
- * @expectedException \RuntimeException
- */
- public function throwRuntimeExceptionOnFillingJobsWithoutSourceFiles()
- {
- $env = array();
- $env['TRAVIS'] = true;
- $env['TRAVIS_JOB_ID'] = '1.1';
-
- $object = $this->collectJsonFileWithoutSourceFiles();
-
- $object->fillJobs($env);
- }
-
- // reportLineCoverage()
-
- /**
- * @test
- */
- public function shouldReportLineCoverage()
- {
- $object = $this->collectJsonFile();
-
- $this->assertSame(50.0, $object->reportLineCoverage());
-
- $metrics = $object->getMetrics();
-
- $this->assertSame(2, $metrics->getStatements());
- $this->assertSame(1, $metrics->getCoveredStatements());
- $this->assertSame(50.0, $metrics->getLineCoverage());
- }
-
- // excludeNoStatementsFiles()
-
- /**
- * @test
- */
- public function shouldExcludeNoStatementsFiles()
- {
- $srcDir = $this->srcDir . DIRECTORY_SEPARATOR;
-
- $object = $this->collectJsonFile();
-
- // before excluding
- $sourceFiles = $object->getSourceFiles();
- $this->assertCount(4, $sourceFiles);
-
- // filenames
- $paths = array_keys($sourceFiles);
- $filenames = array_map(function ($path) use ($srcDir) {return str_replace($srcDir, '', $path); }, $paths);
-
- $this->assertContains('test.php', $filenames);
- $this->assertContains('test2.php', $filenames);
- $this->assertContains('TestInterface.php', $filenames);
- $this->assertContains('AbstractClass.php', $filenames);
-
- // after excluding
- $object->excludeNoStatementsFiles();
-
- $sourceFiles = $object->getSourceFiles();
- $this->assertCount(2, $sourceFiles);
-
- // filenames
- $paths = array_keys($sourceFiles);
- $filenames = array_map(function ($path) use ($srcDir) {return str_replace($srcDir, '', $path); }, $paths);
-
- $this->assertContains('test.php', $filenames);
- $this->assertContains('test2.php', $filenames);
- $this->assertNotContains('TestInterface.php', $filenames);
- $this->assertNotContains('AbstractClass.php', $filenames);
- }
-}
diff --git a/vendor/php-coveralls/php-coveralls/tests/Satooshi/Bundle/CoverallsV1Bundle/Entity/MetricsTest.php b/vendor/php-coveralls/php-coveralls/tests/Satooshi/Bundle/CoverallsV1Bundle/Entity/MetricsTest.php
deleted file mode 100644
index b244a396e9b..00000000000
--- a/vendor/php-coveralls/php-coveralls/tests/Satooshi/Bundle/CoverallsV1Bundle/Entity/MetricsTest.php
+++ /dev/null
@@ -1,118 +0,0 @@
-
- */
-class MetricsTest extends \PHPUnit\Framework\TestCase
-{
- protected function setUp()
- {
- $this->coverage = array_fill(0, 5, null);
- $this->coverage[1] = 1;
- $this->coverage[3] = 1;
- $this->coverage[4] = 0;
- }
-
- // hasStatements()
- // getStatements()
-
- /**
- * @test
- */
- public function shouldNotHaveStatementsOnConstructionWithoutCoverage()
- {
- $object = new Metrics();
-
- $this->assertFalse($object->hasStatements());
- $this->assertSame(0, $object->getStatements());
- }
-
- /**
- * @test
- */
- public function shouldHaveStatementsOnConstructionWithCoverage()
- {
- $object = new Metrics($this->coverage);
-
- $this->assertTrue($object->hasStatements());
- $this->assertSame(3, $object->getStatements());
- }
-
- // getCoveredStatements()
-
- /**
- * @test
- */
- public function shouldNotHaveCoveredStatementsOnConstructionWithoutCoverage()
- {
- $object = new Metrics();
-
- $this->assertSame(0, $object->getCoveredStatements());
- }
-
- /**
- * @test
- */
- public function shouldHaveCoveredStatementsOnConstructionWithCoverage()
- {
- $object = new Metrics($this->coverage);
-
- $this->assertSame(2, $object->getCoveredStatements());
- }
-
- // getLineCoverage()
-
- /**
- * @test
- */
- public function shouldNotHaveLineCoverageOnConstructionWithoutCoverage()
- {
- $object = new Metrics();
-
- $this->assertSame(0, $object->getLineCoverage());
- }
-
- /**
- * @test
- */
- public function shouldHaveLineCoverageOnConstructionWithCoverage()
- {
- $object = new Metrics($this->coverage);
-
- $this->assertSame(200 / 3, $object->getLineCoverage());
- }
-
- // merge()
-
- /**
- * @test
- */
- public function shouldMergeThatWithEmptyMetrics()
- {
- $object = new Metrics();
- $that = new Metrics($this->coverage);
- $object->merge($that);
-
- $this->assertSame(3, $object->getStatements());
- $this->assertSame(2, $object->getCoveredStatements());
- $this->assertSame(200 / 3, $object->getLineCoverage());
- }
-
- /**
- * @test
- */
- public function shouldMergeThat()
- {
- $object = new Metrics($this->coverage);
- $that = new Metrics($this->coverage);
- $object->merge($that);
-
- $this->assertSame(6, $object->getStatements());
- $this->assertSame(4, $object->getCoveredStatements());
- $this->assertSame(400 / 6, $object->getLineCoverage());
- }
-}
diff --git a/vendor/php-coveralls/php-coveralls/tests/Satooshi/Bundle/CoverallsV1Bundle/Entity/SourceFileTest.php b/vendor/php-coveralls/php-coveralls/tests/Satooshi/Bundle/CoverallsV1Bundle/Entity/SourceFileTest.php
deleted file mode 100644
index f6e47d4f4c6..00000000000
--- a/vendor/php-coveralls/php-coveralls/tests/Satooshi/Bundle/CoverallsV1Bundle/Entity/SourceFileTest.php
+++ /dev/null
@@ -1,143 +0,0 @@
-
- */
-class SourceFileTest extends ProjectTestCase
-{
- protected function setUp()
- {
- $this->projectDir = realpath(__DIR__ . '/../../../..');
-
- $this->setUpDir($this->projectDir);
-
- $this->filename = 'test.php';
- $this->path = $this->srcDir . DIRECTORY_SEPARATOR . $this->filename;
-
- $this->object = new SourceFile($this->path, $this->filename);
- }
-
- // getName()
-
- /**
- * @test
- */
- public function shouldHaveNameOnConstruction()
- {
- $this->assertSame($this->filename, $this->object->getName());
- }
-
- // getSource()
-
- /**
- * @test
- */
- public function shouldHaveSourceOnConstruction()
- {
- $expected = trim(file_get_contents($this->path));
-
- $this->assertSame($expected, $this->object->getSource());
- }
-
- // getCoverage()
-
- /**
- * @test
- */
- public function shouldHaveNullCoverageOnConstruction()
- {
- $expected = array_fill(0, 9, null);
-
- $this->assertSame($expected, $this->object->getCoverage());
- }
-
- // getPath()
-
- /**
- * @test
- */
- public function shouldHavePathOnConstruction()
- {
- $this->assertSame($this->path, $this->object->getPath());
- }
-
- // getFileLines()
-
- /**
- * @test
- */
- public function shouldHaveFileLinesOnConstruction()
- {
- $this->assertSame(9, $this->object->getFileLines());
- }
-
- // toArray()
-
- /**
- * @test
- */
- public function shouldConvertToArray()
- {
- $expected = array(
- 'name' => $this->filename,
- 'source' => trim(file_get_contents($this->path)),
- 'coverage' => array_fill(0, 9, null),
- );
-
- $this->assertSame($expected, $this->object->toArray());
- $this->assertSame(json_encode($expected), (string) $this->object);
- }
-
- // addCoverage()
-
- /**
- * @test
- */
- public function shouldAddCoverage()
- {
- $this->object->addCoverage(5, 1);
-
- $expected = array_fill(0, 9, null);
- $expected[5] = 1;
-
- $this->assertSame($expected, $this->object->getCoverage());
- }
-
- // getMetrics()
- // reportLineCoverage()
-
- /**
- * @test
- */
- public function shouldReportLineCoverage0PercentWithoutAddingCoverage()
- {
- $metrics = $this->object->getMetrics();
-
- $this->assertSame(0, $metrics->getStatements());
- $this->assertSame(0, $metrics->getCoveredStatements());
- $this->assertSame(0, $metrics->getLineCoverage());
- $this->assertSame(0, $this->object->reportLineCoverage());
- }
-
- /**
- * @test
- */
- public function shouldReportLineCoverage100PercentAfterAddingCoverage()
- {
- $this->object->addCoverage(6, 1);
-
- $metrics = $this->object->getMetrics();
-
- $this->assertSame(1, $metrics->getStatements());
- $this->assertSame(1, $metrics->getCoveredStatements());
- $this->assertSame(100, $metrics->getLineCoverage());
- $this->assertSame(100, $this->object->reportLineCoverage());
- }
-}
diff --git a/vendor/php-coveralls/php-coveralls/tests/Satooshi/Bundle/CoverallsV1Bundle/Repository/JobsRepositoryTest.php b/vendor/php-coveralls/php-coveralls/tests/Satooshi/Bundle/CoverallsV1Bundle/Repository/JobsRepositoryTest.php
deleted file mode 100644
index b963e8aeec1..00000000000
--- a/vendor/php-coveralls/php-coveralls/tests/Satooshi/Bundle/CoverallsV1Bundle/Repository/JobsRepositoryTest.php
+++ /dev/null
@@ -1,377 +0,0 @@
-
- */
-class JobsRepositoryTest extends ProjectTestCase
-{
- protected function setUp()
- {
- $this->projectDir = realpath(__DIR__ . '/../../../..');
-
- $this->setUpDir($this->projectDir);
- }
-
- // mock
-
- private function setUpJobsApiWithCollectCloverXmlCalled($api)
- {
- $api
- ->collectCloverXml()
- ->will(function () use ($api) {
- return $api;
- })
- ->shouldBeCalled();
- }
-
- private function setUpJobsApiWithCollectCloverXmlThrow($api, $exception)
- {
- $api
- ->collectCloverXml()
- ->willThrow($exception)
- ->shouldBeCalled();
- }
-
- private function setUpJobsApiWithGetJsonFileCalled($api, $jsonFile)
- {
- $api
- ->getJsonFile()
- ->willReturn($jsonFile)
- ->shouldBeCalled();
- }
-
- private function setUpJobsApiWithGetJsonFileNotCalled($api)
- {
- $api
- ->getJsonFile()
- ->shouldNotBeCalled();
- }
-
- private function setUpJobsApiWithCollectGitInfoCalled($api)
- {
- $api
- ->collectGitInfo()
- ->will(function () use ($api) {
- return $api;
- })
- ->shouldBeCalled();
- }
-
- private function setUpJobsApiWithCollectGitInfoNotCalled($api)
- {
- $api
- ->collectGitInfo()
- ->shouldNotBeCalled();
- }
-
- private function setUpJobsApiWithCollectEnvVarsCalled($api)
- {
- $api
- ->collectEnvVars($_SERVER)
- ->will(function () use ($api) {
- return $api;
- })
- ->shouldBeCalled();
- }
-
- private function setUpJobsApiWithCollectEnvVarsNotCalled($api)
- {
- $api
- ->collectEnvVars()
- ->shouldNotBeCalled();
- }
-
- private function setUpJobsApiWithDumpJsonFileCalled($api)
- {
- $api
- ->dumpJsonFile()
- ->will(function () use ($api) {
- return $api;
- })
- ->shouldBeCalled();
- }
-
- private function setUpJobsApiWithDumpJsonFileNotCalled($api)
- {
- $api
- ->dumpJsonFile()
- ->shouldNotBeCalled();
- }
-
- private function setUpJobsApiWithSendCalled($api, $statusCode, $request, $response)
- {
- if ($statusCode === 200) {
- $api
- ->send()
- ->willReturn($response)
- ->shouldBeCalled();
- } else {
- if ($statusCode === null) {
- $exception = new \Guzzle\Http\Exception\CurlException();
- } elseif ($statusCode === 422) {
- $exception = new \Guzzle\Http\Exception\ClientErrorResponseException();
- $exception->setResponse($response);
- } else {
- $exception = new \Guzzle\Http\Exception\ServerErrorResponseException();
- $exception->setResponse($response);
- }
-
- $api
- ->send()
- ->willThrow($exception)
- ->shouldBeCalled();
- }
- }
-
- private function setUpJobsApiWithSendNotCalled($api)
- {
- $api
- ->send()
- ->shouldNotBeCalled();
- }
-
- protected function createApiMockWithRequirementsNotSatisfiedException()
- {
- $api = $this->prophesize('Satooshi\Bundle\CoverallsV1Bundle\Api\Jobs');
- $this->setUpJobsApiWithCollectCloverXmlThrow($api, new RequirementsNotSatisfiedException());
- $this->setUpJobsApiWithGetJsonFileNotCalled($api);
- $this->setUpJobsApiWithCollectGitInfoNotCalled($api);
- $this->setUpJobsApiWithCollectEnvVarsNotCalled($api);
- $this->setUpJobsApiWithDumpJsonFileNotCalled($api);
- $this->setUpJobsApiWithSendNotCalled($api);
-
- return $api->reveal();
- }
-
- protected function createApiMockWithException()
- {
- $api = $this->prophesize('Satooshi\Bundle\CoverallsV1Bundle\Api\Jobs');
- $this->setUpJobsApiWithCollectCloverXmlThrow($api, new \Exception('unexpected exception'));
- $this->setUpJobsApiWithGetJsonFileNotCalled($api);
- $this->setUpJobsApiWithCollectGitInfoNotCalled($api);
- $this->setUpJobsApiWithCollectEnvVarsNotCalled($api);
- $this->setUpJobsApiWithDumpJsonFileNotCalled($api);
- $this->setUpJobsApiWithSendNotCalled($api);
-
- return $api->reveal();
- }
-
- protected function createApiMock($response, $statusCode = '', $uri = '/')
- {
- $api = $this->prophesize('Satooshi\Bundle\CoverallsV1Bundle\Api\Jobs');
- $this->setUpJobsApiWithCollectCloverXmlCalled($api);
- $this->setUpJobsApiWithGetJsonFileCalled($api, $this->createJsonFile());
- $this->setUpJobsApiWithCollectGitInfoCalled($api);
- $this->setUpJobsApiWithCollectEnvVarsCalled($api);
- $this->setUpJobsApiWithDumpJsonFileCalled($api);
- $this->setUpJobsApiWithSendCalled($api, $statusCode, new \Guzzle\Http\Message\Request('POST', $uri), $response);
-
- return $api->reveal();
- }
-
- protected function createLoggerMock()
- {
- $logger = $this->prophesize('Psr\Log\NullLogger');
- $logger->info();
- $logger->error();
-
- return $logger->reveal();
- }
-
- // dependent object
-
- protected function createCoverage($percent)
- {
- // percent = (covered / stmt) * 100;
- // (percent * stmt) / 100 = covered
- $stmt = 100;
- $covered = ($percent * $stmt) / 100;
- $coverage = array_fill(0, 100, 0);
-
- for ($i = 0; $i < $covered; ++$i) {
- $coverage[$i] = 1;
- }
-
- return $coverage;
- }
-
- protected function createJsonFile()
- {
- $jsonFile = new JsonFile();
-
- $repositoryTestDir = $this->srcDir . '/RepositoryTest';
-
- $sourceFiles = array(
- 0 => new SourceFile($repositoryTestDir . '/Coverage0.php', 'Coverage0.php'),
- 10 => new SourceFile($repositoryTestDir . '/Coverage10.php', 'Coverage10.php'),
- 70 => new SourceFile($repositoryTestDir . '/Coverage70.php', 'Coverage70.php'),
- 80 => new SourceFile($repositoryTestDir . '/Coverage80.php', 'Coverage80.php'),
- 90 => new SourceFile($repositoryTestDir . '/Coverage90.php', 'Coverage90.php'),
- 100 => new SourceFile($repositoryTestDir . '/Coverage100.php', 'Coverage100.php'),
- );
-
- foreach ($sourceFiles as $percent => $sourceFile) {
- $sourceFile->getMetrics()->merge(new Metrics($this->createCoverage($percent)));
- $jsonFile->addSourceFile($sourceFile);
- }
-
- return $jsonFile;
- }
-
- protected function createConfiguration()
- {
- $config = new Configuration();
-
- return $config->addCloverXmlPath($this->cloverXmlPath);
- }
-
- // persist()
-
- /**
- * @test
- */
- public function shouldPersist()
- {
- $statusCode = 200;
- $url = 'https://coveralls.io/jobs/67528';
- $response = new \Guzzle\Http\Message\Response(
- $statusCode, array(), json_encode(array(
- 'message' => 'Job #115.3',
- 'url' => $url,
- )), '1.1', 'OK');
- $api = $this->createApiMock($response, $statusCode, $url);
- $config = $this->createConfiguration();
- $logger = $this->createLoggerMock();
-
- $object = new JobsRepository($api, $config);
-
- $object->setLogger($logger);
- $object->persist();
- }
-
- /**
- * @test
- */
- public function shouldPersistDryRun()
- {
- $response = new \Guzzle\Http\Message\Response(
- 200, array(), json_encode(array(
- 'message' => 'Job #115.3',
- 'url' => 'localhost:4040',
- )), '1.1', 'OK');
- $api = $this->createApiMock($response);
- $config = $this->createConfiguration();
- $logger = $this->createLoggerMock();
-
- $object = new JobsRepository($api, $config);
-
- $object->setLogger($logger);
- $object->persist();
- }
-
- // unexpected Exception
- // source files not found
-
- /**
- * @test
- */
- public function unexpectedException()
- {
- $api = $this->createApiMockWithException();
- $config = $this->createConfiguration();
- $logger = $this->createLoggerMock();
-
- $object = new JobsRepository($api, $config);
-
- $object->setLogger($logger);
- $object->persist();
- }
-
- /**
- * @test
- */
- public function requirementsNotSatisfiedException()
- {
- $api = $this->createApiMockWithRequirementsNotSatisfiedException();
- $config = $this->createConfiguration();
- $logger = $this->createLoggerMock();
-
- $object = new JobsRepository($api, $config);
-
- $object->setLogger($logger);
- $object->persist();
- }
-
- // curl error
-
- /**
- * @test
- */
- public function networkDisconnected()
- {
- $api = $this->createApiMock(null, null);
- $config = $this->createConfiguration();
- $logger = $this->createLoggerMock();
-
- $object = new JobsRepository($api, $config);
-
- $object->setLogger($logger);
- $object->persist();
- }
-
- // response 422
-
- /**
- * @test
- */
- public function response422()
- {
- $statusCode = 422;
- $response = new \Guzzle\Http\Message\Response(
- $statusCode, array(), json_encode(array(
- 'message' => 'Build processing error.',
- 'url' => '',
- 'error' => true,
- )), '1.1', 'Unprocessable Entity'
- );
- $api = $this->createApiMock($response, $statusCode);
- $config = $this->createConfiguration();
- $logger = $this->createLoggerMock();
-
- $object = new JobsRepository($api, $config);
-
- $object->setLogger($logger);
- $object->persist();
- }
-
- // response 500
-
- /**
- * @test
- */
- public function response500()
- {
- $statusCode = 500;
- $response = new \Guzzle\Http\Message\Response($statusCode, array(), null, '1.1', 'Internal Server Error');
- $api = $this->createApiMock($response, $statusCode);
- $config = $this->createConfiguration();
- $logger = $this->createLoggerMock();
-
- $object = new JobsRepository($api, $config);
-
- $object->setLogger($logger);
- $object->persist();
- }
-}
diff --git a/vendor/php-coveralls/php-coveralls/tests/Satooshi/Component/File/PathTest.php b/vendor/php-coveralls/php-coveralls/tests/Satooshi/Component/File/PathTest.php
deleted file mode 100644
index c01be7db192..00000000000
--- a/vendor/php-coveralls/php-coveralls/tests/Satooshi/Component/File/PathTest.php
+++ /dev/null
@@ -1,472 +0,0 @@
-
- */
-class PathTest extends \PHPUnit\Framework\TestCase
-{
- protected function setUp()
- {
- $this->existingFile = __DIR__ . '/existing.txt';
- $this->unreadablePath = __DIR__ . '/unreadable.txt';
- $this->unwritablePath = __DIR__ . '/unwritable.txt';
- $this->unwritableDir = __DIR__ . '/unwritable.dir';
-
- $this->object = new Path();
- }
-
- protected function tearDown()
- {
- $this->rmFile($this->existingFile);
- $this->rmFile($this->unreadablePath);
- $this->rmFile($this->unwritablePath);
-
- $this->rmDir($this->unwritableDir);
- }
-
- protected function rmFile($file)
- {
- if (is_file($file)) {
- chmod($file, 0777);
- unlink($file);
- }
- }
-
- protected function rmDir($dir)
- {
- if (is_dir($dir)) {
- chmod($dir, 0777);
- rmdir($dir);
- }
- }
-
- protected function touchUnreadableFile()
- {
- $this->rmFile($this->unreadablePath);
-
- touch($this->unreadablePath);
- chmod($this->unreadablePath, 0377);
- }
-
- protected function touchUnwritableFile()
- {
- $this->rmFile($this->unwritablePath);
-
- touch($this->unwritablePath);
- chmod($this->unwritablePath, 0577);
- }
-
- protected function mkdirUnwritableDir()
- {
- $this->rmDir($this->unwritableDir);
-
- mkdir($this->unwritableDir);
- chmod($this->unwritableDir, 0577);
- }
-
- // provider
-
- public function provideRelativePaths()
- {
- return array(
- array(''),
- array('.'),
- array('..'),
- );
- }
-
- public function provideAbsolutePaths()
- {
- if ($this->isWindowsOS()) {
- return array(
- array('c:\\'),
- array('z:\\path\\to\\somewhere'),
- );
- }
-
- return array(
- array('/'),
- array('/path/to/somewhere'),
- );
- }
-
- // isRelativePath()
-
- /**
- * @test
- * @dataProvider provideRelativePaths
- */
- public function shouldBeRelativePath($path)
- {
- $this->assertTrue($this->object->isRelativePath($path));
- }
-
- /**
- * @test
- * @dataProvider provideAbsolutePaths
- */
- public function shouldNotBeRelativePath($path)
- {
- $this->assertFalse($this->object->isRelativePath($path));
- }
-
- // toAbsolutePath()
-
- /**
- * @test
- */
- public function shouldNotConvertAbsolutePath()
- {
- $path = false;
- $rootDir = __DIR__;
-
- $this->assertFalse($this->object->toAbsolutePath($path, $rootDir));
- }
-
- /**
- * @test
- * @dataProvider provideRelativePaths
- */
- public function shouldConvertAbsolutePathIfRelativePathGiven($path)
- {
- $rootDir = '/path/to/dir';
-
- $expected = $rootDir . DIRECTORY_SEPARATOR . $path;
-
- $this->assertSame($expected, $this->object->toAbsolutePath($path, $rootDir));
- }
-
- /**
- * @test
- */
- public function shouldConvertAbsolutePathIfAbsolutePathGiven()
- {
- $rootDir = '/path/to/dir';
- $path = __DIR__;
-
- $expected = $path;
-
- $this->assertSame($expected, $this->object->toAbsolutePath($path, $rootDir));
- }
-
- // getRealPath()
-
- /**
- * @test
- */
- public function shouldNotBeRealPath()
- {
- $path = false;
- $rootDir = __DIR__;
-
- $this->assertFalse($this->object->getRealPath($path, $rootDir));
- }
-
- /**
- * @test
- * @dataProvider provideRelativePaths
- */
- public function shouldGetRealPathIfRelativePathGiven($path)
- {
- $rootDir = __DIR__;
-
- $expected = realpath($rootDir . DIRECTORY_SEPARATOR . $path);
-
- $this->assertSame($expected, $this->object->getRealPath($path, $rootDir));
- }
-
- /**
- * @test
- */
- public function shouldGetRealPathIfAbsolutePathGiven()
- {
- $path = __DIR__;
- $rootDir = '';
-
- $expected = realpath($path);
-
- $this->assertSame($expected, $this->object->getRealPath($path, $rootDir));
- }
-
- // getRealDir()
-
- /**
- * @test
- */
- public function shouldNotBeRealDir()
- {
- $path = false;
- $rootDir = __DIR__;
-
- $this->assertFalse($this->object->getRealDir($path, $rootDir));
- }
-
- /**
- * @test
- */
- public function shouldGetRealDirIfRelativePathGiven()
- {
- $path = '';
- $rootDir = __DIR__;
-
- $expected = realpath($rootDir . DIRECTORY_SEPARATOR . $path);
-
- $this->assertSame($expected, $this->object->getRealDir($path, $rootDir));
- }
-
- /**
- * @test
- */
- public function shouldGetRealDirIfAbsolutePathGiven()
- {
- $path = __DIR__;
- $rootDir = '';
-
- $expected = realpath($path . '/..');
-
- $this->assertSame($expected, $this->object->getRealDir($path, $rootDir));
- }
-
- // getRealWritingFilePath()
-
- /**
- * @test
- */
- public function shouldNotBeRealWritingFilePath()
- {
- $path = false;
- $rootDir = __DIR__;
-
- $this->assertFalse($this->object->getRealWritingFilePath($path, $rootDir));
- }
-
- /**
- * @test
- */
- public function shouldGetRealWritingPathIfRelativePathGiven()
- {
- $path = 'test.txt';
- $rootDir = __DIR__;
-
- $expected = $rootDir . DIRECTORY_SEPARATOR . $path;
-
- $this->assertSame($expected, $this->object->getRealWritingFilePath($path, $rootDir));
- }
-
- // isRealPathExist()
-
- /**
- * @test
- */
- public function shouldNotExistRealPathIfFalseGiven()
- {
- $path = false;
-
- $this->assertFalse($this->object->isRealPathExist($path));
- }
-
- /**
- * @test
- */
- public function shouldNotExistRealPath()
- {
- $path = __DIR__ . '/dummy.dir';
-
- $this->assertFalse($this->object->isRealPathExist($path));
- }
-
- /**
- * @test
- */
- public function shouldExistRealPath()
- {
- touch($this->existingFile);
-
- $this->assertTrue($this->object->isRealPathExist($this->existingFile));
- }
-
- // isRealFileExist()
-
- /**
- * @test
- */
- public function shouldNotExistRealFile()
- {
- $path = __DIR__ . '/dummy.file';
-
- $this->assertFalse($this->object->isRealFileExist($path));
- }
-
- /**
- * @test
- */
- public function shouldNotExistRealFileIfDirGiven()
- {
- $path = __DIR__;
-
- $this->assertFalse($this->object->isRealFileExist($path));
- }
-
- /**
- * @test
- */
- public function shouldExistRealFile()
- {
- touch($this->existingFile);
-
- $this->assertTrue($this->object->isRealFileExist($this->existingFile));
- }
-
- // isRealFileReadable()
-
- /**
- * @test
- */
- public function shouldNotBeRealFileReadableIfFileNotFound()
- {
- $path = __DIR__ . '/dummy.file';
-
- $this->assertFalse($this->object->isRealFileReadable($path));
- }
-
- /**
- * @test
- */
- public function shouldNotBeRealFileReadableIfFileUnreadable()
- {
- if ($this->isWindowsOS()) {
- // On Windows there is no write-only attribute.
- $this->markTestSkipped('Unable to run on Windows');
- }
-
- $this->touchUnreadableFile();
-
- $this->assertFalse($this->object->isRealFileReadable($this->unreadablePath));
- }
-
- /**
- * @test
- */
- public function shouldBeRealFileReadable()
- {
- touch($this->existingFile);
-
- $this->assertTrue($this->object->isRealFileReadable($this->existingFile));
- }
-
- // isRealFileWritable()
-
- /**
- * @test
- */
- public function shouldNotBeRealFileWritableIfFileNotFound()
- {
- $path = __DIR__ . '/dummy.file';
-
- $this->assertFalse($this->object->isRealFileWritable($path));
- }
-
- /**
- * @test
- */
- public function shouldNotBeRealFileWritableIfFileUnwritable()
- {
- $this->touchUnwritableFile();
-
- $this->assertFalse($this->object->isRealFileWritable($this->unwritablePath));
- }
-
- /**
- * @test
- */
- public function shouldBeRealFileWritable()
- {
- touch($this->existingFile);
-
- $this->assertTrue($this->object->isRealFileWritable($this->existingFile));
- }
-
- // isRealDirExist()
-
- /**
- * @test
- */
- public function shouldNotExistRealDir()
- {
- $path = __DIR__ . '/dummy.dir';
-
- $this->assertFalse($this->object->isRealDirExist($path));
- }
-
- /**
- * @test
- */
- public function shouldNotExistRealDirIfFileGiven()
- {
- touch($this->existingFile);
-
- $this->assertFalse($this->object->isRealDirExist($this->existingFile));
- }
-
- /**
- * @test
- */
- public function shouldExistRealDir()
- {
- $path = __DIR__;
-
- $this->assertTrue($this->object->isRealDirExist($path));
- }
-
- // isRealDirWritable()
-
- /**
- * @test
- */
- public function shouldNotBeRealDirWritableIfDirNotFound()
- {
- $path = __DIR__ . '/dummy.dir';
-
- $this->assertFalse($this->object->isRealDirWritable($path));
- }
-
- /**
- * @test
- */
- public function shouldNotBeRealDirWritableIfDirUnwritable()
- {
- if ($this->isWindowsOS()) {
- // On Windows read-only attribute on dir applies to files in dir, but not the dir itself.
- $this->markTestSkipped('Unable to run on Windows');
- }
-
- $this->mkdirUnwritableDir();
-
- $this->assertFalse($this->object->isRealDirWritable($this->unwritableDir));
- }
-
- /**
- * @test
- */
- public function shouldBeRealDirWritable()
- {
- $path = __DIR__;
-
- $this->assertTrue($this->object->isRealDirWritable($path));
- }
-
- private function isWindowsOS()
- {
- static $isWindows;
-
- if ($isWindows === null) {
- $isWindows = strtoupper(substr(PHP_OS, 0, 3)) === 'WIN';
- }
-
- return $isWindows;
- }
-}
diff --git a/vendor/php-coveralls/php-coveralls/tests/Satooshi/Component/Log/ConsoleLoggerTest.php b/vendor/php-coveralls/php-coveralls/tests/Satooshi/Component/Log/ConsoleLoggerTest.php
deleted file mode 100644
index 59670d06fc4..00000000000
--- a/vendor/php-coveralls/php-coveralls/tests/Satooshi/Component/Log/ConsoleLoggerTest.php
+++ /dev/null
@@ -1,39 +0,0 @@
-
- */
-class ConsoleLoggerTest extends \PHPUnit\Framework\TestCase
-{
- protected function createAdapterMockWith($message)
- {
- $mock = $this->getMockBuilder('Symfony\Component\Console\Output\StreamOutput')
- ->disableOriginalConstructor()
- ->setMethods(array('writeln'))
- ->getMock();
-
- $mock
- ->expects($this->once())
- ->method('writeln')
- ->with($this->equalTo($message));
-
- return $mock;
- }
-
- /**
- * @test
- */
- public function shouldWritelnToOutput()
- {
- $message = 'log test message';
- $output = $this->createAdapterMockWith($message);
-
- $object = new ConsoleLogger($output);
-
- $object->log('info', $message);
- }
-}
diff --git a/vendor/php-coveralls/php-coveralls/tests/Satooshi/Component/System/Git/GitCommandTest.php b/vendor/php-coveralls/php-coveralls/tests/Satooshi/Component/System/Git/GitCommandTest.php
deleted file mode 100644
index 855118bc681..00000000000
--- a/vendor/php-coveralls/php-coveralls/tests/Satooshi/Component/System/Git/GitCommandTest.php
+++ /dev/null
@@ -1,59 +0,0 @@
-
- */
-class GitCommandTest extends \PHPUnit\Framework\TestCase
-{
- /**
- * @test
- */
- public function shouldReturnBranches()
- {
- $object = new GitCommand();
- $actual = $object->getBranches();
-
- $this->assertInternalType('array', $actual);
- $this->assertNotEmpty($actual);
- }
-
- /**
- * @test
- */
- public function shouldReturnHeadCommit()
- {
- $object = new GitCommand();
- $actual = $object->getHeadCommit();
-
- $this->assertInternalType('array', $actual);
- $this->assertNotEmpty($actual);
- $this->assertCount(6, $actual);
- }
-
- /**
- * @test
- */
- public function shouldReturnRemotes()
- {
- $object = new GitCommand();
- $actual = $object->getRemotes();
-
- $this->assertInternalType('array', $actual);
- $this->assertNotEmpty($actual);
- }
-
- /**
- * @test
- * @expectedException \RuntimeException
- */
- public function throwRuntimeExceptionIfExecutedWithoutArgs()
- {
- $object = new GitCommand();
- $object->execute();
- }
-}
diff --git a/vendor/php-coveralls/php-coveralls/tests/Satooshi/ProjectTestCase.php b/vendor/php-coveralls/php-coveralls/tests/Satooshi/ProjectTestCase.php
deleted file mode 100644
index 39f8c85d32a..00000000000
--- a/vendor/php-coveralls/php-coveralls/tests/Satooshi/ProjectTestCase.php
+++ /dev/null
@@ -1,73 +0,0 @@
-rootDir = realpath($projectDir . '/prj');
- $this->srcDir = realpath($this->rootDir . '/files');
-
- $this->url = 'https://coveralls.io/api/v1/jobs';
- $this->filename = 'json_file';
-
- // build
- $this->buildDir = $this->rootDir . '/build';
- $this->logsDir = $this->rootDir . '/build/logs';
-
- // log
- $this->cloverXmlPath = $this->logsDir . '/clover.xml';
- $this->cloverXmlPath1 = $this->logsDir . '/clover-part1.xml';
- $this->cloverXmlPath2 = $this->logsDir . '/clover-part2.xml';
- $this->jsonPath = $this->logsDir . '/coveralls-upload.json';
- }
-
- protected function makeProjectDir($srcDir = null, $logsDir = null, $cloverXmlPaths = null, $logsDirUnwritable = false, $jsonPathUnwritable = false)
- {
- if ($srcDir !== null && !is_dir($srcDir)) {
- mkdir($srcDir, 0777, true);
- }
-
- if ($logsDir !== null && !is_dir($logsDir)) {
- mkdir($logsDir, 0777, true);
- }
-
- if ($cloverXmlPaths !== null) {
- if (is_array($cloverXmlPaths)) {
- foreach ($cloverXmlPaths as $cloverXmlPath) {
- touch($cloverXmlPath);
- }
- } else {
- touch($cloverXmlPaths);
- }
- }
-
- if ($logsDirUnwritable) {
- if (file_exists($logsDir)) {
- chmod($logsDir, 0577);
- }
- }
-
- if ($jsonPathUnwritable) {
- touch($this->jsonPath);
- chmod($this->jsonPath, 0577);
- }
- }
-
- protected function rmFile($file)
- {
- if (is_file($file)) {
- chmod(dirname($file), 0777);
- unlink($file);
- }
- }
-
- protected function rmDir($dir)
- {
- if (is_dir($dir)) {
- chmod($dir, 0777);
- rmdir($dir);
- }
- }
-}
diff --git a/vendor/php-coveralls/php-coveralls/tests/prj/coveralls.yml b/vendor/php-coveralls/php-coveralls/tests/prj/coveralls.yml
deleted file mode 100644
index 565c7da4358..00000000000
--- a/vendor/php-coveralls/php-coveralls/tests/prj/coveralls.yml
+++ /dev/null
@@ -1 +0,0 @@
-# empty config
diff --git a/vendor/php-coveralls/php-coveralls/tests/prj/files/AbstractClass.php b/vendor/php-coveralls/php-coveralls/tests/prj/files/AbstractClass.php
deleted file mode 100644
index 8b2292e3657..00000000000
--- a/vendor/php-coveralls/php-coveralls/tests/prj/files/AbstractClass.php
+++ /dev/null
@@ -1,6 +0,0 @@
-message = 'hoge';
- }
-}
diff --git a/vendor/php-coveralls/php-coveralls/tests/prj/files/test2.php b/vendor/php-coveralls/php-coveralls/tests/prj/files/test2.php
deleted file mode 100644
index 156ad63da06..00000000000
--- a/vendor/php-coveralls/php-coveralls/tests/prj/files/test2.php
+++ /dev/null
@@ -1,10 +0,0 @@
-message = 'hoge';
- }
-}
diff --git a/vendor/php-coveralls/php-coveralls/tests/prj/files/test3.php b/vendor/php-coveralls/php-coveralls/tests/prj/files/test3.php
deleted file mode 100644
index 9df6b791a89..00000000000
--- a/vendor/php-coveralls/php-coveralls/tests/prj/files/test3.php
+++ /dev/null
@@ -1,10 +0,0 @@
-message = 'hoge';
- }
-}
diff --git a/vendor/phpdocumentor/reflection-docblock/.gitignore b/vendor/phpdocumentor/reflection-docblock/.gitignore
deleted file mode 100644
index 3ce5adbbde5..00000000000
--- a/vendor/phpdocumentor/reflection-docblock/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-.idea
-vendor
diff --git a/vendor/phpdocumentor/reflection-docblock/.travis.yml b/vendor/phpdocumentor/reflection-docblock/.travis.yml
deleted file mode 100644
index eef782c423c..00000000000
--- a/vendor/phpdocumentor/reflection-docblock/.travis.yml
+++ /dev/null
@@ -1,32 +0,0 @@
-language: php
-php:
- - 5.3.3
- - 5.3
- - 5.4
- - 5.5
- - 5.6
- - hhvm
- - hhvm-nightly
-
-matrix:
- allow_failures:
- - php: hhvm
- - php: hhvm-nightly
-
-script:
- - vendor/bin/phpunit
-
-before_script:
- - sudo apt-get -qq update > /dev/null
- - phpenv rehash > /dev/null
- - composer selfupdate --quiet
- - composer install --no-interaction --prefer-source --dev
- - vendor/bin/phpunit
- - composer update --no-interaction --prefer-source --dev
-
-notifications:
- irc: "irc.freenode.org#phpdocumentor"
- email:
- - mike.vanriel@naenius.com
- - ashnazg@php.net
- - boen.robot@gmail.com
diff --git a/vendor/phpdocumentor/reflection-docblock/LICENSE b/vendor/phpdocumentor/reflection-docblock/LICENSE
deleted file mode 100644
index 792e4040f26..00000000000
--- a/vendor/phpdocumentor/reflection-docblock/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2010 Mike van Riel
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/vendor/phpdocumentor/reflection-docblock/README.md b/vendor/phpdocumentor/reflection-docblock/README.md
deleted file mode 100644
index 6405d1a10c8..00000000000
--- a/vendor/phpdocumentor/reflection-docblock/README.md
+++ /dev/null
@@ -1,57 +0,0 @@
-The ReflectionDocBlock Component [![Build Status](https://secure.travis-ci.org/phpDocumentor/ReflectionDocBlock.png)](https://travis-ci.org/phpDocumentor/ReflectionDocBlock)
-================================
-
-Introduction
-------------
-
-The ReflectionDocBlock component of phpDocumentor provides a DocBlock parser
-that is 100% compatible with the [PHPDoc standard](http://phpdoc.org/docs/latest).
-
-With this component, a library can provide support for annotations via DocBlocks
-or otherwise retrieve information that is embedded in a DocBlock.
-
-> **Note**: *this is a core component of phpDocumentor and is constantly being
-> optimized for performance.*
-
-Installation
-------------
-
-You can install the component in the following ways:
-
-* Use the official Github repository (https://github.com/phpDocumentor/ReflectionDocBlock)
-* Via Composer (http://packagist.org/packages/phpdocumentor/reflection-docblock)
-
-Usage
------
-
-The ReflectionDocBlock component is designed to work in an identical fashion to
-PHP's own Reflection extension (http://php.net/manual/en/book.reflection.php).
-
-Parsing can be initiated by instantiating the
-`\phpDocumentor\Reflection\DocBlock()` class and passing it a string containing
-a DocBlock (including asterisks) or by passing an object supporting the
-`getDocComment()` method.
-
-> *Examples of objects having the `getDocComment()` method are the
-> `ReflectionClass` and the `ReflectionMethod` classes of the PHP
-> Reflection extension*
-
-Example:
-
- $class = new ReflectionClass('MyClass');
- $phpdoc = new \phpDocumentor\Reflection\DocBlock($class);
-
-or
-
- $docblock = <<=5.3.3"
- },
- "autoload": {
- "psr-0": {"phpDocumentor": ["src/"]}
- },
- "require-dev": {
- "phpunit/phpunit": "~4.0"
- },
- "suggest": {
- "dflydev/markdown": "~1.0",
- "erusev/parsedown": "~1.0"
- },
- "extra": {
- "branch-alias": {
- "dev-master": "2.0.x-dev"
- }
- }
-}
diff --git a/vendor/phpdocumentor/reflection-docblock/composer.lock b/vendor/phpdocumentor/reflection-docblock/composer.lock
deleted file mode 100644
index 4c6a8bb78b2..00000000000
--- a/vendor/phpdocumentor/reflection-docblock/composer.lock
+++ /dev/null
@@ -1,827 +0,0 @@
-{
- "_readme": [
- "This file locks the dependencies of your project to a known state",
- "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
- "This file is @generated automatically"
- ],
- "hash": "ea1734d11b8c878445c2c6e58de8b85f",
- "packages": [],
- "packages-dev": [
- {
- "name": "ocramius/instantiator",
- "version": "1.1.2",
- "source": {
- "type": "git",
- "url": "https://github.com/Ocramius/Instantiator.git",
- "reference": "a7abbb5fc9df6e7126af741dd6c140d1a7369435"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/Ocramius/Instantiator/zipball/a7abbb5fc9df6e7126af741dd6c140d1a7369435",
- "reference": "a7abbb5fc9df6e7126af741dd6c140d1a7369435",
- "shasum": ""
- },
- "require": {
- "ocramius/lazy-map": "1.0.*",
- "php": "~5.3"
- },
- "require-dev": {
- "athletic/athletic": "~0.1.8",
- "ext-pdo": "*",
- "ext-phar": "*",
- "phpunit/phpunit": "~4.0",
- "squizlabs/php_codesniffer": "2.0.*@ALPHA"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "2.0.x-dev"
- }
- },
- "autoload": {
- "psr-0": {
- "Instantiator\\": "src"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Marco Pivetta",
- "email": "ocramius@gmail.com",
- "homepage": "http://ocramius.github.com/"
- }
- ],
- "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors",
- "homepage": "https://github.com/Ocramius/Instantiator",
- "keywords": [
- "constructor",
- "instantiate"
- ],
- "time": "2014-08-14 15:10:55"
- },
- {
- "name": "ocramius/lazy-map",
- "version": "1.0.0",
- "source": {
- "type": "git",
- "url": "https://github.com/Ocramius/LazyMap.git",
- "reference": "7fe3d347f5e618bcea7d39345ff83f3651d8b752"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/Ocramius/LazyMap/zipball/7fe3d347f5e618bcea7d39345ff83f3651d8b752",
- "reference": "7fe3d347f5e618bcea7d39345ff83f3651d8b752",
- "shasum": ""
- },
- "require": {
- "php": ">=5.3.3"
- },
- "require-dev": {
- "athletic/athletic": "~0.1.6",
- "phpmd/phpmd": "1.5.*",
- "phpunit/phpunit": ">=3.7",
- "satooshi/php-coveralls": "~0.6",
- "squizlabs/php_codesniffer": "1.4.*"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.0.x-dev"
- }
- },
- "autoload": {
- "psr-0": {
- "LazyMap\\": "src"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Marco Pivetta",
- "email": "ocramius@gmail.com",
- "homepage": "http://ocramius.github.com/",
- "role": "Developer"
- }
- ],
- "description": "A library that provides lazy instantiation logic for a map of objects",
- "homepage": "https://github.com/Ocramius/LazyMap",
- "keywords": [
- "lazy",
- "lazy instantiation",
- "lazy loading",
- "map",
- "service location"
- ],
- "time": "2013-11-09 22:30:54"
- },
- {
- "name": "phpunit/php-code-coverage",
- "version": "2.0.10",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/php-code-coverage.git",
- "reference": "6d196af48e8c100a3ae881940123e693da5a9217"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/6d196af48e8c100a3ae881940123e693da5a9217",
- "reference": "6d196af48e8c100a3ae881940123e693da5a9217",
- "shasum": ""
- },
- "require": {
- "php": ">=5.3.3",
- "phpunit/php-file-iterator": "~1.3.1",
- "phpunit/php-text-template": "~1.2.0",
- "phpunit/php-token-stream": "~1.2.2",
- "sebastian/environment": "~1.0.0",
- "sebastian/version": "~1.0.3"
- },
- "require-dev": {
- "ext-xdebug": ">=2.1.4",
- "phpunit/phpunit": "~4.0.14"
- },
- "suggest": {
- "ext-dom": "*",
- "ext-xdebug": ">=2.2.1",
- "ext-xmlwriter": "*"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "2.0.x-dev"
- }
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "include-path": [
- ""
- ],
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sb@sebastian-bergmann.de",
- "role": "lead"
- }
- ],
- "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.",
- "homepage": "https://github.com/sebastianbergmann/php-code-coverage",
- "keywords": [
- "coverage",
- "testing",
- "xunit"
- ],
- "time": "2014-08-06 06:39:42"
- },
- {
- "name": "phpunit/php-file-iterator",
- "version": "1.3.4",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/php-file-iterator.git",
- "reference": "acd690379117b042d1c8af1fafd61bde001bf6bb"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/acd690379117b042d1c8af1fafd61bde001bf6bb",
- "reference": "acd690379117b042d1c8af1fafd61bde001bf6bb",
- "shasum": ""
- },
- "require": {
- "php": ">=5.3.3"
- },
- "type": "library",
- "autoload": {
- "classmap": [
- "File/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "include-path": [
- ""
- ],
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sb@sebastian-bergmann.de",
- "role": "lead"
- }
- ],
- "description": "FilterIterator implementation that filters files based on a list of suffixes.",
- "homepage": "https://github.com/sebastianbergmann/php-file-iterator/",
- "keywords": [
- "filesystem",
- "iterator"
- ],
- "time": "2013-10-10 15:34:57"
- },
- {
- "name": "phpunit/php-text-template",
- "version": "1.2.0",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/php-text-template.git",
- "reference": "206dfefc0ffe9cebf65c413e3d0e809c82fbf00a"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/206dfefc0ffe9cebf65c413e3d0e809c82fbf00a",
- "reference": "206dfefc0ffe9cebf65c413e3d0e809c82fbf00a",
- "shasum": ""
- },
- "require": {
- "php": ">=5.3.3"
- },
- "type": "library",
- "autoload": {
- "classmap": [
- "Text/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "include-path": [
- ""
- ],
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sb@sebastian-bergmann.de",
- "role": "lead"
- }
- ],
- "description": "Simple template engine.",
- "homepage": "https://github.com/sebastianbergmann/php-text-template/",
- "keywords": [
- "template"
- ],
- "time": "2014-01-30 17:20:04"
- },
- {
- "name": "phpunit/php-timer",
- "version": "1.0.5",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/php-timer.git",
- "reference": "19689d4354b295ee3d8c54b4f42c3efb69cbc17c"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/19689d4354b295ee3d8c54b4f42c3efb69cbc17c",
- "reference": "19689d4354b295ee3d8c54b4f42c3efb69cbc17c",
- "shasum": ""
- },
- "require": {
- "php": ">=5.3.3"
- },
- "type": "library",
- "autoload": {
- "classmap": [
- "PHP/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "include-path": [
- ""
- ],
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sb@sebastian-bergmann.de",
- "role": "lead"
- }
- ],
- "description": "Utility class for timing",
- "homepage": "https://github.com/sebastianbergmann/php-timer/",
- "keywords": [
- "timer"
- ],
- "time": "2013-08-02 07:42:54"
- },
- {
- "name": "phpunit/php-token-stream",
- "version": "1.2.2",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/php-token-stream.git",
- "reference": "ad4e1e23ae01b483c16f600ff1bebec184588e32"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/ad4e1e23ae01b483c16f600ff1bebec184588e32",
- "reference": "ad4e1e23ae01b483c16f600ff1bebec184588e32",
- "shasum": ""
- },
- "require": {
- "ext-tokenizer": "*",
- "php": ">=5.3.3"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.2-dev"
- }
- },
- "autoload": {
- "classmap": [
- "PHP/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "include-path": [
- ""
- ],
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sb@sebastian-bergmann.de",
- "role": "lead"
- }
- ],
- "description": "Wrapper around PHP's tokenizer extension.",
- "homepage": "https://github.com/sebastianbergmann/php-token-stream/",
- "keywords": [
- "tokenizer"
- ],
- "time": "2014-03-03 05:10:30"
- },
- {
- "name": "phpunit/phpunit",
- "version": "4.2.2",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/phpunit.git",
- "reference": "a33fa68ece9f8c68589bfc2da8d2794e27b820bc"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a33fa68ece9f8c68589bfc2da8d2794e27b820bc",
- "reference": "a33fa68ece9f8c68589bfc2da8d2794e27b820bc",
- "shasum": ""
- },
- "require": {
- "ext-dom": "*",
- "ext-json": "*",
- "ext-pcre": "*",
- "ext-reflection": "*",
- "ext-spl": "*",
- "php": ">=5.3.3",
- "phpunit/php-code-coverage": "~2.0",
- "phpunit/php-file-iterator": "~1.3.1",
- "phpunit/php-text-template": "~1.2",
- "phpunit/php-timer": "~1.0.2",
- "phpunit/phpunit-mock-objects": "~2.2",
- "sebastian/comparator": "~1.0",
- "sebastian/diff": "~1.1",
- "sebastian/environment": "~1.0",
- "sebastian/exporter": "~1.0",
- "sebastian/version": "~1.0",
- "symfony/yaml": "~2.0"
- },
- "suggest": {
- "phpunit/php-invoker": "~1.1"
- },
- "bin": [
- "phpunit"
- ],
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "4.2.x-dev"
- }
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "include-path": [
- "",
- "../../symfony/yaml/"
- ],
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de",
- "role": "lead"
- }
- ],
- "description": "The PHP Unit Testing framework.",
- "homepage": "http://www.phpunit.de/",
- "keywords": [
- "phpunit",
- "testing",
- "xunit"
- ],
- "time": "2014-08-18 05:12:30"
- },
- {
- "name": "phpunit/phpunit-mock-objects",
- "version": "2.2.0",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git",
- "reference": "42e589e08bc86e3e9bdf20d385e948347788505b"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/42e589e08bc86e3e9bdf20d385e948347788505b",
- "reference": "42e589e08bc86e3e9bdf20d385e948347788505b",
- "shasum": ""
- },
- "require": {
- "ocramius/instantiator": "~1.0",
- "php": ">=5.3.3",
- "phpunit/php-text-template": "~1.2"
- },
- "require-dev": {
- "phpunit/phpunit": "4.2.*@dev"
- },
- "suggest": {
- "ext-soap": "*"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "2.2.x-dev"
- }
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "include-path": [
- ""
- ],
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sb@sebastian-bergmann.de",
- "role": "lead"
- }
- ],
- "description": "Mock Object library for PHPUnit",
- "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/",
- "keywords": [
- "mock",
- "xunit"
- ],
- "time": "2014-08-02 13:50:58"
- },
- {
- "name": "sebastian/comparator",
- "version": "1.0.0",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/comparator.git",
- "reference": "f7069ee51fa9fb6c038e16a9d0e3439f5449dcf2"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/f7069ee51fa9fb6c038e16a9d0e3439f5449dcf2",
- "reference": "f7069ee51fa9fb6c038e16a9d0e3439f5449dcf2",
- "shasum": ""
- },
- "require": {
- "php": ">=5.3.3",
- "sebastian/diff": "~1.1",
- "sebastian/exporter": "~1.0"
- },
- "require-dev": {
- "phpunit/phpunit": "~4.1"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.0.x-dev"
- }
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de",
- "role": "lead"
- },
- {
- "name": "Jeff Welch",
- "email": "whatthejeff@gmail.com"
- },
- {
- "name": "Volker Dusch",
- "email": "github@wallbash.com"
- },
- {
- "name": "Bernhard Schussek",
- "email": "bschussek@2bepublished.at"
- }
- ],
- "description": "Provides the functionality to compare PHP values for equality",
- "homepage": "http://www.github.com/sebastianbergmann/comparator",
- "keywords": [
- "comparator",
- "compare",
- "equality"
- ],
- "time": "2014-05-02 07:05:58"
- },
- {
- "name": "sebastian/diff",
- "version": "1.1.0",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/diff.git",
- "reference": "1e091702a5a38e6b4c1ba9ca816e3dd343df2e2d"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/1e091702a5a38e6b4c1ba9ca816e3dd343df2e2d",
- "reference": "1e091702a5a38e6b4c1ba9ca816e3dd343df2e2d",
- "shasum": ""
- },
- "require": {
- "php": ">=5.3.3"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.1-dev"
- }
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de",
- "role": "lead"
- },
- {
- "name": "Kore Nordmann",
- "email": "mail@kore-nordmann.de"
- }
- ],
- "description": "Diff implementation",
- "homepage": "http://www.github.com/sebastianbergmann/diff",
- "keywords": [
- "diff"
- ],
- "time": "2013-08-03 16:46:33"
- },
- {
- "name": "sebastian/environment",
- "version": "1.0.0",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/environment.git",
- "reference": "79517609ec01139cd7e9fded0dd7ce08c952ef6a"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/79517609ec01139cd7e9fded0dd7ce08c952ef6a",
- "reference": "79517609ec01139cd7e9fded0dd7ce08c952ef6a",
- "shasum": ""
- },
- "require": {
- "php": ">=5.3.3"
- },
- "require-dev": {
- "phpunit/phpunit": "4.0.*@dev"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.0.x-dev"
- }
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de",
- "role": "lead"
- }
- ],
- "description": "Provides functionality to handle HHVM/PHP environments",
- "homepage": "http://www.github.com/sebastianbergmann/environment",
- "keywords": [
- "Xdebug",
- "environment",
- "hhvm"
- ],
- "time": "2014-02-18 16:17:19"
- },
- {
- "name": "sebastian/exporter",
- "version": "1.0.1",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/exporter.git",
- "reference": "1f9a98e6f5dfe0524cb8c6166f7c82f3e9ae1529"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/1f9a98e6f5dfe0524cb8c6166f7c82f3e9ae1529",
- "reference": "1f9a98e6f5dfe0524cb8c6166f7c82f3e9ae1529",
- "shasum": ""
- },
- "require": {
- "php": ">=5.3.3"
- },
- "require-dev": {
- "phpunit/phpunit": "4.0.*@dev"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.0.x-dev"
- }
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de",
- "role": "lead"
- },
- {
- "name": "Jeff Welch",
- "email": "whatthejeff@gmail.com"
- },
- {
- "name": "Volker Dusch",
- "email": "github@wallbash.com"
- },
- {
- "name": "Adam Harvey",
- "email": "aharvey@php.net",
- "role": "Lead"
- },
- {
- "name": "Bernhard Schussek",
- "email": "bschussek@2bepublished.at"
- }
- ],
- "description": "Provides the functionality to export PHP variables for visualization",
- "homepage": "http://www.github.com/sebastianbergmann/exporter",
- "keywords": [
- "export",
- "exporter"
- ],
- "time": "2014-02-16 08:26:31"
- },
- {
- "name": "sebastian/version",
- "version": "1.0.3",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/version.git",
- "reference": "b6e1f0cf6b9e1ec409a0d3e2f2a5fb0998e36b43"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/b6e1f0cf6b9e1ec409a0d3e2f2a5fb0998e36b43",
- "reference": "b6e1f0cf6b9e1ec409a0d3e2f2a5fb0998e36b43",
- "shasum": ""
- },
- "type": "library",
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de",
- "role": "lead"
- }
- ],
- "description": "Library that helps with managing the version number of Git-hosted PHP projects",
- "homepage": "https://github.com/sebastianbergmann/version",
- "time": "2014-03-07 15:35:33"
- },
- {
- "name": "symfony/yaml",
- "version": "v2.5.3",
- "target-dir": "Symfony/Component/Yaml",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/Yaml.git",
- "reference": "5a75366ae9ca8b4792cd0083e4ca4dff9fe96f1f"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/Yaml/zipball/5a75366ae9ca8b4792cd0083e4ca4dff9fe96f1f",
- "reference": "5a75366ae9ca8b4792cd0083e4ca4dff9fe96f1f",
- "shasum": ""
- },
- "require": {
- "php": ">=5.3.3"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "2.5-dev"
- }
- },
- "autoload": {
- "psr-0": {
- "Symfony\\Component\\Yaml\\": ""
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Symfony Community",
- "homepage": "http://symfony.com/contributors"
- },
- {
- "name": "Fabien Potencier",
- "email": "fabien@symfony.com"
- }
- ],
- "description": "Symfony Yaml Component",
- "homepage": "http://symfony.com",
- "time": "2014-08-05 09:00:40"
- }
- ],
- "aliases": [],
- "minimum-stability": "stable",
- "stability-flags": [],
- "prefer-stable": false,
- "platform": {
- "php": ">=5.3.3"
- },
- "platform-dev": []
-}
diff --git a/vendor/phpdocumentor/reflection-docblock/phpunit.xml.dist b/vendor/phpdocumentor/reflection-docblock/phpunit.xml.dist
deleted file mode 100644
index f67ad2a20c7..00000000000
--- a/vendor/phpdocumentor/reflection-docblock/phpunit.xml.dist
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
- ./tests/
-
-
-
-
- ./src/
-
-
-
diff --git a/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock.php b/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock.php
deleted file mode 100644
index 02968b1637b..00000000000
--- a/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock.php
+++ /dev/null
@@ -1,468 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection;
-
-use phpDocumentor\Reflection\DocBlock\Tag;
-use phpDocumentor\Reflection\DocBlock\Context;
-use phpDocumentor\Reflection\DocBlock\Location;
-
-/**
- * Parses the DocBlock for any structure.
- *
- * @author Mike van Riel
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class DocBlock implements \Reflector
-{
- /** @var string The opening line for this docblock. */
- protected $short_description = '';
-
- /**
- * @var DocBlock\Description The actual
- * description for this docblock.
- */
- protected $long_description = null;
-
- /**
- * @var Tag[] An array containing all
- * the tags in this docblock; except inline.
- */
- protected $tags = array();
-
- /** @var Context Information about the context of this DocBlock. */
- protected $context = null;
-
- /** @var Location Information about the location of this DocBlock. */
- protected $location = null;
-
- /** @var bool Is this DocBlock (the start of) a template? */
- protected $isTemplateStart = false;
-
- /** @var bool Does this DocBlock signify the end of a DocBlock template? */
- protected $isTemplateEnd = false;
-
- /**
- * Parses the given docblock and populates the member fields.
- *
- * The constructor may also receive namespace information such as the
- * current namespace and aliases. This information is used by some tags
- * (e.g. @return, @param, etc.) to turn a relative Type into a FQCN.
- *
- * @param \Reflector|string $docblock A docblock comment (including
- * asterisks) or reflector supporting the getDocComment method.
- * @param Context $context The context in which the DocBlock
- * occurs.
- * @param Location $location The location within the file that this
- * DocBlock occurs in.
- *
- * @throws \InvalidArgumentException if the given argument does not have the
- * getDocComment method.
- */
- public function __construct(
- $docblock,
- Context $context = null,
- Location $location = null
- ) {
- if (is_object($docblock)) {
- if (!method_exists($docblock, 'getDocComment')) {
- throw new \InvalidArgumentException(
- 'Invalid object passed; the given reflector must support '
- . 'the getDocComment method'
- );
- }
-
- $docblock = $docblock->getDocComment();
- }
-
- $docblock = $this->cleanInput($docblock);
-
- list($templateMarker, $short, $long, $tags) = $this->splitDocBlock($docblock);
- $this->isTemplateStart = $templateMarker === '#@+';
- $this->isTemplateEnd = $templateMarker === '#@-';
- $this->short_description = $short;
- $this->long_description = new DocBlock\Description($long, $this);
- $this->parseTags($tags);
-
- $this->context = $context;
- $this->location = $location;
- }
-
- /**
- * Strips the asterisks from the DocBlock comment.
- *
- * @param string $comment String containing the comment text.
- *
- * @return string
- */
- protected function cleanInput($comment)
- {
- $comment = trim(
- preg_replace(
- '#[ \t]*(?:\/\*\*|\*\/|\*)?[ \t]{0,1}(.*)?#u',
- '$1',
- $comment
- )
- );
-
- // reg ex above is not able to remove */ from a single line docblock
- if (substr($comment, -2) == '*/') {
- $comment = trim(substr($comment, 0, -2));
- }
-
- // normalize strings
- $comment = str_replace(array("\r\n", "\r"), "\n", $comment);
-
- return $comment;
- }
-
- /**
- * Splits the DocBlock into a template marker, summary, description and block of tags.
- *
- * @param string $comment Comment to split into the sub-parts.
- *
- * @author Richard van Velzen (@_richardJ) Special thanks to Richard for the regex responsible for the split.
- * @author Mike van Riel for extending the regex with template marker support.
- *
- * @return string[] containing the template marker (if any), summary, description and a string containing the tags.
- */
- protected function splitDocBlock($comment)
- {
- // Performance improvement cheat: if the first character is an @ then only tags are in this DocBlock. This
- // method does not split tags so we return this verbatim as the fourth result (tags). This saves us the
- // performance impact of running a regular expression
- if (strpos($comment, '@') === 0) {
- return array('', '', '', $comment);
- }
-
- // clears all extra horizontal whitespace from the line endings to prevent parsing issues
- $comment = preg_replace('/\h*$/Sum', '', $comment);
-
- /*
- * Splits the docblock into a template marker, short description, long description and tags section
- *
- * - The template marker is empty, #@+ or #@- if the DocBlock starts with either of those (a newline may
- * occur after it and will be stripped).
- * - The short description is started from the first character until a dot is encountered followed by a
- * newline OR two consecutive newlines (horizontal whitespace is taken into account to consider spacing
- * errors). This is optional.
- * - The long description, any character until a new line is encountered followed by an @ and word
- * characters (a tag). This is optional.
- * - Tags; the remaining characters
- *
- * Big thanks to RichardJ for contributing this Regular Expression
- */
- preg_match(
- '/
- \A
- # 1. Extract the template marker
- (?:(\#\@\+|\#\@\-)\n?)?
-
- # 2. Extract the summary
- (?:
- (?! @\pL ) # The summary may not start with an @
- (
- [^\n.]+
- (?:
- (?! \. \n | \n{2} ) # End summary upon a dot followed by newline or two newlines
- [\n.] (?! [ \t]* @\pL ) # End summary when an @ is found as first character on a new line
- [^\n.]+ # Include anything else
- )*
- \.?
- )?
- )
-
- # 3. Extract the description
- (?:
- \s* # Some form of whitespace _must_ precede a description because a summary must be there
- (?! @\pL ) # The description may not start with an @
- (
- [^\n]+
- (?: \n+
- (?! [ \t]* @\pL ) # End description when an @ is found as first character on a new line
- [^\n]+ # Include anything else
- )*
- )
- )?
-
- # 4. Extract the tags (anything that follows)
- (\s+ [\s\S]*)? # everything that follows
- /ux',
- $comment,
- $matches
- );
- array_shift($matches);
-
- while (count($matches) < 4) {
- $matches[] = '';
- }
-
- return $matches;
- }
-
- /**
- * Creates the tag objects.
- *
- * @param string $tags Tag block to parse.
- *
- * @return void
- */
- protected function parseTags($tags)
- {
- $result = array();
- $tags = trim($tags);
- if ('' !== $tags) {
- if ('@' !== $tags[0]) {
- throw new \LogicException(
- 'A tag block started with text instead of an actual tag,'
- . ' this makes the tag block invalid: ' . $tags
- );
- }
- foreach (explode("\n", $tags) as $tag_line) {
- if (isset($tag_line[0]) && ($tag_line[0] === '@')) {
- $result[] = $tag_line;
- } else {
- $result[count($result) - 1] .= "\n" . $tag_line;
- }
- }
-
- // create proper Tag objects
- foreach ($result as $key => $tag_line) {
- $result[$key] = Tag::createInstance(trim($tag_line), $this);
- }
- }
-
- $this->tags = $result;
- }
-
- /**
- * Gets the text portion of the doc block.
- *
- * Gets the text portion (short and long description combined) of the doc
- * block.
- *
- * @return string The text portion of the doc block.
- */
- public function getText()
- {
- $short = $this->getShortDescription();
- $long = $this->getLongDescription()->getContents();
-
- if ($long) {
- return "{$short}\n\n{$long}";
- } else {
- return $short;
- }
- }
-
- /**
- * Set the text portion of the doc block.
- *
- * Sets the text portion (short and long description combined) of the doc
- * block.
- *
- * @param string $docblock The new text portion of the doc block.
- *
- * @return $this This doc block.
- */
- public function setText($comment)
- {
- list(,$short, $long) = $this->splitDocBlock($comment);
- $this->short_description = $short;
- $this->long_description = new DocBlock\Description($long, $this);
- return $this;
- }
- /**
- * Returns the opening line or also known as short description.
- *
- * @return string
- */
- public function getShortDescription()
- {
- return $this->short_description;
- }
-
- /**
- * Returns the full description or also known as long description.
- *
- * @return DocBlock\Description
- */
- public function getLongDescription()
- {
- return $this->long_description;
- }
-
- /**
- * Returns whether this DocBlock is the start of a Template section.
- *
- * A Docblock may serve as template for a series of subsequent DocBlocks. This is indicated by a special marker
- * (`#@+`) that is appended directly after the opening `/**` of a DocBlock.
- *
- * An example of such an opening is:
- *
- * ```
- * /**#@+
- * * My DocBlock
- * * /
- * ```
- *
- * The description and tags (not the summary!) are copied onto all subsequent DocBlocks and also applied to all
- * elements that follow until another DocBlock is found that contains the closing marker (`#@-`).
- *
- * @see self::isTemplateEnd() for the check whether a closing marker was provided.
- *
- * @return boolean
- */
- public function isTemplateStart()
- {
- return $this->isTemplateStart;
- }
-
- /**
- * Returns whether this DocBlock is the end of a Template section.
- *
- * @see self::isTemplateStart() for a more complete description of the Docblock Template functionality.
- *
- * @return boolean
- */
- public function isTemplateEnd()
- {
- return $this->isTemplateEnd;
- }
-
- /**
- * Returns the current context.
- *
- * @return Context
- */
- public function getContext()
- {
- return $this->context;
- }
-
- /**
- * Returns the current location.
- *
- * @return Location
- */
- public function getLocation()
- {
- return $this->location;
- }
-
- /**
- * Returns the tags for this DocBlock.
- *
- * @return Tag[]
- */
- public function getTags()
- {
- return $this->tags;
- }
-
- /**
- * Returns an array of tags matching the given name. If no tags are found
- * an empty array is returned.
- *
- * @param string $name String to search by.
- *
- * @return Tag[]
- */
- public function getTagsByName($name)
- {
- $result = array();
-
- /** @var Tag $tag */
- foreach ($this->getTags() as $tag) {
- if ($tag->getName() != $name) {
- continue;
- }
-
- $result[] = $tag;
- }
-
- return $result;
- }
-
- /**
- * Checks if a tag of a certain type is present in this DocBlock.
- *
- * @param string $name Tag name to check for.
- *
- * @return bool
- */
- public function hasTag($name)
- {
- /** @var Tag $tag */
- foreach ($this->getTags() as $tag) {
- if ($tag->getName() == $name) {
- return true;
- }
- }
-
- return false;
- }
-
- /**
- * Appends a tag at the end of the list of tags.
- *
- * @param Tag $tag The tag to add.
- *
- * @return Tag The newly added tag.
- *
- * @throws \LogicException When the tag belongs to a different DocBlock.
- */
- public function appendTag(Tag $tag)
- {
- if (null === $tag->getDocBlock()) {
- $tag->setDocBlock($this);
- }
-
- if ($tag->getDocBlock() === $this) {
- $this->tags[] = $tag;
- } else {
- throw new \LogicException(
- 'This tag belongs to a different DocBlock object.'
- );
- }
-
- return $tag;
- }
-
-
- /**
- * Builds a string representation of this object.
- *
- * @todo determine the exact format as used by PHP Reflection and
- * implement it.
- *
- * @return string
- * @codeCoverageIgnore Not yet implemented
- */
- public static function export()
- {
- throw new \Exception('Not yet implemented');
- }
-
- /**
- * Returns the exported information (we should use the export static method
- * BUT this throws an exception at this point).
- *
- * @return string
- * @codeCoverageIgnore Not yet implemented
- */
- public function __toString()
- {
- return 'Not yet implemented';
- }
-}
diff --git a/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Context.php b/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Context.php
deleted file mode 100644
index 81aa83ce537..00000000000
--- a/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Context.php
+++ /dev/null
@@ -1,154 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock;
-
-/**
- * The context in which a DocBlock occurs.
- *
- * @author Vasil Rangelov
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class Context
-{
- /** @var string The current namespace. */
- protected $namespace = '';
-
- /** @var array List of namespace aliases => Fully Qualified Namespace. */
- protected $namespace_aliases = array();
-
- /** @var string Name of the structural element, within the namespace. */
- protected $lsen = '';
-
- /**
- * Cteates a new context.
- * @param string $namespace The namespace where this DocBlock
- * resides in.
- * @param array $namespace_aliases List of namespace aliases => Fully
- * Qualified Namespace.
- * @param string $lsen Name of the structural element, within
- * the namespace.
- */
- public function __construct(
- $namespace = '',
- array $namespace_aliases = array(),
- $lsen = ''
- ) {
- if (!empty($namespace)) {
- $this->setNamespace($namespace);
- }
- $this->setNamespaceAliases($namespace_aliases);
- $this->setLSEN($lsen);
- }
-
- /**
- * @return string The namespace where this DocBlock resides in.
- */
- public function getNamespace()
- {
- return $this->namespace;
- }
-
- /**
- * @return array List of namespace aliases => Fully Qualified Namespace.
- */
- public function getNamespaceAliases()
- {
- return $this->namespace_aliases;
- }
-
- /**
- * Returns the Local Structural Element Name.
- *
- * @return string Name of the structural element, within the namespace.
- */
- public function getLSEN()
- {
- return $this->lsen;
- }
-
- /**
- * Sets a new namespace.
- *
- * Sets a new namespace for the context. Leading and trailing slashes are
- * trimmed, and the keywords "global" and "default" are treated as aliases
- * to no namespace.
- *
- * @param string $namespace The new namespace to set.
- *
- * @return $this
- */
- public function setNamespace($namespace)
- {
- if ('global' !== $namespace
- && 'default' !== $namespace
- ) {
- // Srip leading and trailing slash
- $this->namespace = trim((string)$namespace, '\\');
- } else {
- $this->namespace = '';
- }
- return $this;
- }
-
- /**
- * Sets the namespace aliases, replacing all previous ones.
- *
- * @param array $namespace_aliases List of namespace aliases => Fully
- * Qualified Namespace.
- *
- * @return $this
- */
- public function setNamespaceAliases(array $namespace_aliases)
- {
- $this->namespace_aliases = array();
- foreach ($namespace_aliases as $alias => $fqnn) {
- $this->setNamespaceAlias($alias, $fqnn);
- }
- return $this;
- }
-
- /**
- * Adds a namespace alias to the context.
- *
- * @param string $alias The alias name (the part after "as", or the last
- * part of the Fully Qualified Namespace Name) to add.
- * @param string $fqnn The Fully Qualified Namespace Name for this alias.
- * Any form of leading/trailing slashes are accepted, but what will be
- * stored is a name, prefixed with a slash, and no trailing slash.
- *
- * @return $this
- */
- public function setNamespaceAlias($alias, $fqnn)
- {
- $this->namespace_aliases[$alias] = '\\' . trim((string)$fqnn, '\\');
- return $this;
- }
-
- /**
- * Sets a new Local Structural Element Name.
- *
- * Sets a new Local Structural Element Name. A local name also contains
- * punctuation determining the kind of structural element (e.g. trailing "("
- * and ")" for functions and methods).
- *
- * @param string $lsen The new local name of a structural element.
- *
- * @return $this
- */
- public function setLSEN($lsen)
- {
- $this->lsen = (string)$lsen;
- return $this;
- }
-}
diff --git a/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Description.php b/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Description.php
deleted file mode 100644
index d41142e28de..00000000000
--- a/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Description.php
+++ /dev/null
@@ -1,223 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock;
-
-use phpDocumentor\Reflection\DocBlock;
-
-/**
- * Parses a Description of a DocBlock or tag.
- *
- * @author Mike van Riel
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class Description implements \Reflector
-{
- /** @var string */
- protected $contents = '';
-
- /** @var array The contents, as an array of strings and Tag objects. */
- protected $parsedContents = null;
-
- /** @var DocBlock The DocBlock which this description belongs to. */
- protected $docblock = null;
-
- /**
- * Populates the fields of a description.
- *
- * @param string $content The description's conetnts.
- * @param DocBlock $docblock The DocBlock which this description belongs to.
- */
- public function __construct($content, DocBlock $docblock = null)
- {
- $this->setContent($content)->setDocBlock($docblock);
- }
-
- /**
- * Gets the text of this description.
- *
- * @return string
- */
- public function getContents()
- {
- return $this->contents;
- }
-
- /**
- * Sets the text of this description.
- *
- * @param string $content The new text of this description.
- *
- * @return $this
- */
- public function setContent($content)
- {
- $this->contents = trim($content);
-
- $this->parsedContents = null;
- return $this;
- }
-
- /**
- * Returns the parsed text of this description.
- *
- * @return array An array of strings and tag objects, in the order they
- * occur within the description.
- */
- public function getParsedContents()
- {
- if (null === $this->parsedContents) {
- $this->parsedContents = preg_split(
- '/\{
- # "{@}" is not a valid inline tag. This ensures that
- # we do not treat it as one, but treat it literally.
- (?!@\})
- # We want to capture the whole tag line, but without the
- # inline tag delimiters.
- (\@
- # Match everything up to the next delimiter.
- [^{}]*
- # Nested inline tag content should not be captured, or
- # it will appear in the result separately.
- (?:
- # Match nested inline tags.
- (?:
- # Because we did not catch the tag delimiters
- # earlier, we must be explicit with them here.
- # Notice that this also matches "{}", as a way
- # to later introduce it as an escape sequence.
- \{(?1)?\}
- |
- # Make sure we match hanging "{".
- \{
- )
- # Match content after the nested inline tag.
- [^{}]*
- )* # If there are more inline tags, match them as well.
- # We use "*" since there may not be any nested inline
- # tags.
- )
- \}/Sux',
- $this->contents,
- null,
- PREG_SPLIT_DELIM_CAPTURE
- );
-
- $count = count($this->parsedContents);
- for ($i=1; $i<$count; $i += 2) {
- $this->parsedContents[$i] = Tag::createInstance(
- $this->parsedContents[$i],
- $this->docblock
- );
- }
-
- //In order to allow "literal" inline tags, the otherwise invalid
- //sequence "{@}" is changed to "@", and "{}" is changed to "}".
- //See unit tests for examples.
- for ($i=0; $i<$count; $i += 2) {
- $this->parsedContents[$i] = str_replace(
- array('{@}', '{}'),
- array('@', '}'),
- $this->parsedContents[$i]
- );
- }
- }
- return $this->parsedContents;
- }
-
- /**
- * Return a formatted variant of the Long Description using MarkDown.
- *
- * @todo this should become a more intelligent piece of code where the
- * configuration contains a setting what format long descriptions are.
- *
- * @codeCoverageIgnore Will be removed soon, in favor of adapters at
- * PhpDocumentor itself that will process text in various formats.
- *
- * @return string
- */
- public function getFormattedContents()
- {
- $result = $this->contents;
-
- // if the long description contains a plain HTML element, surround
- // it with a pre element. Please note that we explicitly used str_replace
- // and not preg_replace to gain performance
- if (strpos($result, '') !== false) {
- $result = str_replace(
- array('', "\r\n", "\n", "\r", '
'),
- array('', '', '', '', '
'),
- $result
- );
- }
-
- if (class_exists('Parsedown')) {
- $markdown = \Parsedown::instance();
- $result = $markdown->parse($result);
- } elseif (class_exists('dflydev\markdown\MarkdownExtraParser')) {
- $markdown = new \dflydev\markdown\MarkdownExtraParser();
- $result = $markdown->transformMarkdown($result);
- }
-
- return trim($result);
- }
-
- /**
- * Gets the docblock this tag belongs to.
- *
- * @return DocBlock The docblock this description belongs to.
- */
- public function getDocBlock()
- {
- return $this->docblock;
- }
-
- /**
- * Sets the docblock this tag belongs to.
- *
- * @param DocBlock $docblock The new docblock this description belongs to.
- * Setting NULL removes any association.
- *
- * @return $this
- */
- public function setDocBlock(DocBlock $docblock = null)
- {
- $this->docblock = $docblock;
-
- return $this;
- }
-
- /**
- * Builds a string representation of this object.
- *
- * @todo determine the exact format as used by PHP Reflection
- * and implement it.
- *
- * @return void
- * @codeCoverageIgnore Not yet implemented
- */
- public static function export()
- {
- throw new \Exception('Not yet implemented');
- }
-
- /**
- * Returns the long description as a string.
- *
- * @return string
- */
- public function __toString()
- {
- return $this->getContents();
- }
-}
diff --git a/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Location.php b/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Location.php
deleted file mode 100644
index 966ed44d72d..00000000000
--- a/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Location.php
+++ /dev/null
@@ -1,76 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock;
-
-/**
- * The location a DocBlock occurs within a file.
- *
- * @author Vasil Rangelov
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class Location
-{
- /** @var int Line where the DocBlock text starts. */
- protected $lineNumber = 0;
-
- /** @var int Column where the DocBlock text starts. */
- protected $columnNumber = 0;
-
- public function __construct(
- $lineNumber = 0,
- $columnNumber = 0
- ) {
- $this->setLineNumber($lineNumber)->setColumnNumber($columnNumber);
- }
-
- /**
- * @return int Line where the DocBlock text starts.
- */
- public function getLineNumber()
- {
- return $this->lineNumber;
- }
-
- /**
- *
- * @param type $lineNumber
- * @return $this
- */
- public function setLineNumber($lineNumber)
- {
- $this->lineNumber = (int)$lineNumber;
-
- return $this;
- }
-
- /**
- * @return int Column where the DocBlock text starts.
- */
- public function getColumnNumber()
- {
- return $this->columnNumber;
- }
-
- /**
- *
- * @param int $columnNumber
- * @return $this
- */
- public function setColumnNumber($columnNumber)
- {
- $this->columnNumber = (int)$columnNumber;
-
- return $this;
- }
-}
diff --git a/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Serializer.php b/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Serializer.php
deleted file mode 100644
index c1617850e2b..00000000000
--- a/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Serializer.php
+++ /dev/null
@@ -1,198 +0,0 @@
-
- * @copyright 2013 Mike van Riel / Naenius (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock;
-
-use phpDocumentor\Reflection\DocBlock;
-
-/**
- * Serializes a DocBlock instance.
- *
- * @author Barry vd. Heuvel
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class Serializer
-{
-
- /** @var string The string to indent the comment with. */
- protected $indentString = ' ';
-
- /** @var int The number of times the indent string is repeated. */
- protected $indent = 0;
-
- /** @var bool Whether to indent the first line. */
- protected $isFirstLineIndented = true;
-
- /** @var int|null The max length of a line. */
- protected $lineLength = null;
-
- /**
- * Create a Serializer instance.
- *
- * @param int $indent The number of times the indent string is
- * repeated.
- * @param string $indentString The string to indent the comment with.
- * @param bool $indentFirstLine Whether to indent the first line.
- * @param int|null $lineLength The max length of a line or NULL to
- * disable line wrapping.
- */
- public function __construct(
- $indent = 0,
- $indentString = ' ',
- $indentFirstLine = true,
- $lineLength = null
- ) {
- $this->setIndentationString($indentString);
- $this->setIndent($indent);
- $this->setIsFirstLineIndented($indentFirstLine);
- $this->setLineLength($lineLength);
- }
-
- /**
- * Sets the string to indent comments with.
- *
- * @param string $indentationString The string to indent comments with.
- *
- * @return $this This serializer object.
- */
- public function setIndentationString($indentString)
- {
- $this->indentString = (string)$indentString;
- return $this;
- }
-
- /**
- * Gets the string to indent comments with.
- *
- * @return string The indent string.
- */
- public function getIndentationString()
- {
- return $this->indentString;
- }
-
- /**
- * Sets the number of indents.
- *
- * @param int $indent The number of times the indent string is repeated.
- *
- * @return $this This serializer object.
- */
- public function setIndent($indent)
- {
- $this->indent = (int)$indent;
- return $this;
- }
-
- /**
- * Gets the number of indents.
- *
- * @return int The number of times the indent string is repeated.
- */
- public function getIndent()
- {
- return $this->indent;
- }
-
- /**
- * Sets whether or not the first line should be indented.
- *
- * Sets whether or not the first line (the one with the "/**") should be
- * indented.
- *
- * @param bool $indentFirstLine The new value for this setting.
- *
- * @return $this This serializer object.
- */
- public function setIsFirstLineIndented($indentFirstLine)
- {
- $this->isFirstLineIndented = (bool)$indentFirstLine;
- return $this;
- }
-
- /**
- * Gets whether or not the first line should be indented.
- *
- * @return bool Whether or not the first line should be indented.
- */
- public function isFirstLineIndented()
- {
- return $this->isFirstLineIndented;
- }
-
- /**
- * Sets the line length.
- *
- * Sets the length of each line in the serialization. Content will be
- * wrapped within this limit.
- *
- * @param int|null $lineLength The length of each line. NULL to disable line
- * wrapping altogether.
- *
- * @return $this This serializer object.
- */
- public function setLineLength($lineLength)
- {
- $this->lineLength = null === $lineLength ? null : (int)$lineLength;
- return $this;
- }
-
- /**
- * Gets the line length.
- *
- * @return int|null The length of each line or NULL if line wrapping is
- * disabled.
- */
- public function getLineLength()
- {
- return $this->lineLength;
- }
-
- /**
- * Generate a DocBlock comment.
- *
- * @param DocBlock The DocBlock to serialize.
- *
- * @return string The serialized doc block.
- */
- public function getDocComment(DocBlock $docblock)
- {
- $indent = str_repeat($this->indentString, $this->indent);
- $firstIndent = $this->isFirstLineIndented ? $indent : '';
-
- $text = $docblock->getText();
- if ($this->lineLength) {
- //3 === strlen(' * ')
- $wrapLength = $this->lineLength - strlen($indent) - 3;
- $text = wordwrap($text, $wrapLength);
- }
- $text = str_replace("\n", "\n{$indent} * ", $text);
-
- $comment = "{$firstIndent}/**\n{$indent} * {$text}\n{$indent} *\n";
-
- /** @var Tag $tag */
- foreach ($docblock->getTags() as $tag) {
- $tagText = (string) $tag;
- if ($this->lineLength) {
- $tagText = wordwrap($tagText, $wrapLength);
- }
- $tagText = str_replace("\n", "\n{$indent} * ", $tagText);
-
- $comment .= "{$indent} * {$tagText}\n";
- }
-
- $comment .= $indent . ' */';
-
- return $comment;
- }
-}
diff --git a/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag.php b/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag.php
deleted file mode 100644
index a96db09521d..00000000000
--- a/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag.php
+++ /dev/null
@@ -1,377 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock;
-
-use phpDocumentor\Reflection\DocBlock;
-
-/**
- * Parses a tag definition for a DocBlock.
- *
- * @author Mike van Riel
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class Tag implements \Reflector
-{
- /**
- * PCRE regular expression matching a tag name.
- */
- const REGEX_TAGNAME = '[\w\-\_\\\\]+';
-
- /** @var string Name of the tag */
- protected $tag = '';
-
- /**
- * @var string|null Content of the tag.
- * When set to NULL, it means it needs to be regenerated.
- */
- protected $content = '';
-
- /** @var string Description of the content of this tag */
- protected $description = '';
-
- /**
- * @var array|null The description, as an array of strings and Tag objects.
- * When set to NULL, it means it needs to be regenerated.
- */
- protected $parsedDescription = null;
-
- /** @var Location Location of the tag. */
- protected $location = null;
-
- /** @var DocBlock The DocBlock which this tag belongs to. */
- protected $docblock = null;
-
- /**
- * @var array An array with a tag as a key, and an FQCN to a class that
- * handles it as an array value. The class is expected to inherit this
- * class.
- */
- private static $tagHandlerMappings = array(
- 'author'
- => '\phpDocumentor\Reflection\DocBlock\Tag\AuthorTag',
- 'covers'
- => '\phpDocumentor\Reflection\DocBlock\Tag\CoversTag',
- 'deprecated'
- => '\phpDocumentor\Reflection\DocBlock\Tag\DeprecatedTag',
- 'example'
- => '\phpDocumentor\Reflection\DocBlock\Tag\ExampleTag',
- 'link'
- => '\phpDocumentor\Reflection\DocBlock\Tag\LinkTag',
- 'method'
- => '\phpDocumentor\Reflection\DocBlock\Tag\MethodTag',
- 'param'
- => '\phpDocumentor\Reflection\DocBlock\Tag\ParamTag',
- 'property-read'
- => '\phpDocumentor\Reflection\DocBlock\Tag\PropertyReadTag',
- 'property'
- => '\phpDocumentor\Reflection\DocBlock\Tag\PropertyTag',
- 'property-write'
- => '\phpDocumentor\Reflection\DocBlock\Tag\PropertyWriteTag',
- 'return'
- => '\phpDocumentor\Reflection\DocBlock\Tag\ReturnTag',
- 'see'
- => '\phpDocumentor\Reflection\DocBlock\Tag\SeeTag',
- 'since'
- => '\phpDocumentor\Reflection\DocBlock\Tag\SinceTag',
- 'source'
- => '\phpDocumentor\Reflection\DocBlock\Tag\SourceTag',
- 'throw'
- => '\phpDocumentor\Reflection\DocBlock\Tag\ThrowsTag',
- 'throws'
- => '\phpDocumentor\Reflection\DocBlock\Tag\ThrowsTag',
- 'uses'
- => '\phpDocumentor\Reflection\DocBlock\Tag\UsesTag',
- 'var'
- => '\phpDocumentor\Reflection\DocBlock\Tag\VarTag',
- 'version'
- => '\phpDocumentor\Reflection\DocBlock\Tag\VersionTag'
- );
-
- /**
- * Factory method responsible for instantiating the correct sub type.
- *
- * @param string $tag_line The text for this tag, including description.
- * @param DocBlock $docblock The DocBlock which this tag belongs to.
- * @param Location $location Location of the tag.
- *
- * @throws \InvalidArgumentException if an invalid tag line was presented.
- *
- * @return static A new tag object.
- */
- final public static function createInstance(
- $tag_line,
- DocBlock $docblock = null,
- Location $location = null
- ) {
- if (!preg_match(
- '/^@(' . self::REGEX_TAGNAME . ')(?:\s*([^\s].*)|$)?/us',
- $tag_line,
- $matches
- )) {
- throw new \InvalidArgumentException(
- 'Invalid tag_line detected: ' . $tag_line
- );
- }
-
- $handler = __CLASS__;
- if (isset(self::$tagHandlerMappings[$matches[1]])) {
- $handler = self::$tagHandlerMappings[$matches[1]];
- } elseif (isset($docblock)) {
- $tagName = (string)new Type\Collection(
- array($matches[1]),
- $docblock->getContext()
- );
-
- if (isset(self::$tagHandlerMappings[$tagName])) {
- $handler = self::$tagHandlerMappings[$tagName];
- }
- }
-
- return new $handler(
- $matches[1],
- isset($matches[2]) ? $matches[2] : '',
- $docblock,
- $location
- );
- }
-
- /**
- * Registers a handler for tags.
- *
- * Registers a handler for tags. The class specified is autoloaded if it's
- * not available. It must inherit from this class.
- *
- * @param string $tag Name of tag to regiser a handler for. When
- * registering a namespaced tag, the full name, along with a prefixing
- * slash MUST be provided.
- * @param string|null $handler FQCN of handler. Specifing NULL removes the
- * handler for the specified tag, if any.
- *
- * @return bool TRUE on success, FALSE on failure.
- */
- final public static function registerTagHandler($tag, $handler)
- {
- $tag = trim((string)$tag);
-
- if (null === $handler) {
- unset(self::$tagHandlerMappings[$tag]);
- return true;
- }
-
- if ('' !== $tag
- && class_exists($handler, true)
- && is_subclass_of($handler, __CLASS__)
- && !strpos($tag, '\\') //Accept no slash, and 1st slash at offset 0.
- ) {
- self::$tagHandlerMappings[$tag] = $handler;
- return true;
- }
-
- return false;
- }
-
- /**
- * Parses a tag and populates the member variables.
- *
- * @param string $name Name of the tag.
- * @param string $content The contents of the given tag.
- * @param DocBlock $docblock The DocBlock which this tag belongs to.
- * @param Location $location Location of the tag.
- */
- public function __construct(
- $name,
- $content,
- DocBlock $docblock = null,
- Location $location = null
- ) {
- $this
- ->setName($name)
- ->setContent($content)
- ->setDocBlock($docblock)
- ->setLocation($location);
- }
-
- /**
- * Gets the name of this tag.
- *
- * @return string The name of this tag.
- */
- public function getName()
- {
- return $this->tag;
- }
-
- /**
- * Sets the name of this tag.
- *
- * @param string $name The new name of this tag.
- *
- * @return $this
- * @throws \InvalidArgumentException When an invalid tag name is provided.
- */
- public function setName($name)
- {
- if (!preg_match('/^' . self::REGEX_TAGNAME . '$/u', $name)) {
- throw new \InvalidArgumentException(
- 'Invalid tag name supplied: ' . $name
- );
- }
-
- $this->tag = $name;
-
- return $this;
- }
-
- /**
- * Gets the content of this tag.
- *
- * @return string
- */
- public function getContent()
- {
- if (null === $this->content) {
- $this->content = $this->description;
- }
-
- return $this->content;
- }
-
- /**
- * Sets the content of this tag.
- *
- * @param string $content The new content of this tag.
- *
- * @return $this
- */
- public function setContent($content)
- {
- $this->setDescription($content);
- $this->content = $content;
-
- return $this;
- }
-
- /**
- * Gets the description component of this tag.
- *
- * @return string
- */
- public function getDescription()
- {
- return $this->description;
- }
-
- /**
- * Sets the description component of this tag.
- *
- * @param string $description The new description component of this tag.
- *
- * @return $this
- */
- public function setDescription($description)
- {
- $this->content = null;
- $this->parsedDescription = null;
- $this->description = trim($description);
-
- return $this;
- }
-
- /**
- * Gets the parsed text of this description.
- *
- * @return array An array of strings and tag objects, in the order they
- * occur within the description.
- */
- public function getParsedDescription()
- {
- if (null === $this->parsedDescription) {
- $description = new Description($this->description, $this->docblock);
- $this->parsedDescription = $description->getParsedContents();
- }
- return $this->parsedDescription;
- }
-
- /**
- * Gets the docblock this tag belongs to.
- *
- * @return DocBlock The docblock this tag belongs to.
- */
- public function getDocBlock()
- {
- return $this->docblock;
- }
-
- /**
- * Sets the docblock this tag belongs to.
- *
- * @param DocBlock $docblock The new docblock this tag belongs to. Setting
- * NULL removes any association.
- *
- * @return $this
- */
- public function setDocBlock(DocBlock $docblock = null)
- {
- $this->docblock = $docblock;
-
- return $this;
- }
-
- /**
- * Gets the location of the tag.
- *
- * @return Location The tag's location.
- */
- public function getLocation()
- {
- return $this->location;
- }
-
- /**
- * Sets the location of the tag.
- *
- * @param Location $location The new location of the tag.
- *
- * @return $this
- */
- public function setLocation(Location $location = null)
- {
- $this->location = $location;
-
- return $this;
- }
-
- /**
- * Builds a string representation of this object.
- *
- * @todo determine the exact format as used by PHP Reflection and implement it.
- *
- * @return void
- * @codeCoverageIgnore Not yet implemented
- */
- public static function export()
- {
- throw new \Exception('Not yet implemented');
- }
-
- /**
- * Returns the tag as a serialized string
- *
- * @return string
- */
- public function __toString()
- {
- return "@{$this->getName()} {$this->getContent()}";
- }
-}
diff --git a/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/AuthorTag.php b/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/AuthorTag.php
deleted file mode 100644
index bacf52ebe78..00000000000
--- a/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/AuthorTag.php
+++ /dev/null
@@ -1,131 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tag;
-
-use phpDocumentor\Reflection\DocBlock\Tag;
-
-/**
- * Reflection class for an @author tag in a Docblock.
- *
- * @author Mike van Riel
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class AuthorTag extends Tag
-{
- /**
- * PCRE regular expression matching any valid value for the name component.
- */
- const REGEX_AUTHOR_NAME = '[^\<]*';
-
- /**
- * PCRE regular expression matching any valid value for the email component.
- */
- const REGEX_AUTHOR_EMAIL = '[^\>]*';
-
- /** @var string The name of the author */
- protected $authorName = '';
-
- /** @var string The email of the author */
- protected $authorEmail = '';
-
- public function getContent()
- {
- if (null === $this->content) {
- $this->content = $this->authorName;
- if ('' != $this->authorEmail) {
- $this->content .= "<{$this->authorEmail}>";
- }
- }
-
- return $this->content;
- }
-
- /**
- * {@inheritdoc}
- */
- public function setContent($content)
- {
- parent::setContent($content);
- if (preg_match(
- '/^(' . self::REGEX_AUTHOR_NAME .
- ')(\<(' . self::REGEX_AUTHOR_EMAIL .
- ')\>)?$/u',
- $this->description,
- $matches
- )) {
- $this->authorName = trim($matches[1]);
- if (isset($matches[3])) {
- $this->authorEmail = trim($matches[3]);
- }
- }
-
- return $this;
- }
-
- /**
- * Gets the author's name.
- *
- * @return string The author's name.
- */
- public function getAuthorName()
- {
- return $this->authorName;
- }
-
- /**
- * Sets the author's name.
- *
- * @param string $authorName The new author name.
- * An invalid value will set an empty string.
- *
- * @return $this
- */
- public function setAuthorName($authorName)
- {
- $this->content = null;
- $this->authorName
- = preg_match('/^' . self::REGEX_AUTHOR_NAME . '$/u', $authorName)
- ? $authorName : '';
-
- return $this;
- }
-
- /**
- * Gets the author's email.
- *
- * @return string The author's email.
- */
- public function getAuthorEmail()
- {
- return $this->authorEmail;
- }
-
- /**
- * Sets the author's email.
- *
- * @param string $authorEmail The new author email.
- * An invalid value will set an empty string.
- *
- * @return $this
- */
- public function setAuthorEmail($authorEmail)
- {
- $this->authorEmail
- = preg_match('/^' . self::REGEX_AUTHOR_EMAIL . '$/u', $authorEmail)
- ? $authorEmail : '';
-
- $this->content = null;
- return $this;
- }
-}
diff --git a/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/CoversTag.php b/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/CoversTag.php
deleted file mode 100644
index bd31b56bfc8..00000000000
--- a/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/CoversTag.php
+++ /dev/null
@@ -1,24 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tag;
-
-/**
- * Reflection class for a @covers tag in a Docblock.
- *
- * @author Mike van Riel
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class CoversTag extends SeeTag
-{
-}
diff --git a/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/DeprecatedTag.php b/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/DeprecatedTag.php
deleted file mode 100644
index 7226316b7d9..00000000000
--- a/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/DeprecatedTag.php
+++ /dev/null
@@ -1,26 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tag;
-
-use phpDocumentor\Reflection\DocBlock\Tag\VersionTag;
-
-/**
- * Reflection class for a @deprecated tag in a Docblock.
- *
- * @author Vasil Rangelov
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class DeprecatedTag extends VersionTag
-{
-}
diff --git a/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/ExampleTag.php b/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/ExampleTag.php
deleted file mode 100644
index 0e163ea01b9..00000000000
--- a/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/ExampleTag.php
+++ /dev/null
@@ -1,156 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tag;
-
-use phpDocumentor\Reflection\DocBlock\Tag;
-
-/**
- * Reflection class for a @example tag in a Docblock.
- *
- * @author Vasil Rangelov
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class ExampleTag extends SourceTag
-{
- /**
- * @var string Path to a file to use as an example.
- * May also be an absolute URI.
- */
- protected $filePath = '';
-
- /**
- * @var bool Whether the file path component represents an URI.
- * This determines how the file portion appears at {@link getContent()}.
- */
- protected $isURI = false;
-
- /**
- * {@inheritdoc}
- */
- public function getContent()
- {
- if (null === $this->content) {
- $filePath = '';
- if ($this->isURI) {
- if (false === strpos($this->filePath, ':')) {
- $filePath = str_replace(
- '%2F',
- '/',
- rawurlencode($this->filePath)
- );
- } else {
- $filePath = $this->filePath;
- }
- } else {
- $filePath = '"' . $this->filePath . '"';
- }
-
- $this->content = $filePath . ' ' . parent::getContent();
- }
-
- return $this->content;
- }
- /**
- * {@inheritdoc}
- */
- public function setContent($content)
- {
- Tag::setContent($content);
- if (preg_match(
- '/^
- # File component
- (?:
- # File path in quotes
- \"([^\"]+)\"
- |
- # File URI
- (\S+)
- )
- # Remaining content (parsed by SourceTag)
- (?:\s+(.*))?
- $/sux',
- $this->description,
- $matches
- )) {
- if ('' !== $matches[1]) {
- $this->setFilePath($matches[1]);
- } else {
- $this->setFileURI($matches[2]);
- }
-
- if (isset($matches[3])) {
- parent::setContent($matches[3]);
- } else {
- $this->setDescription('');
- }
- $this->content = $content;
- }
-
- return $this;
- }
-
- /**
- * Returns the file path.
- *
- * @return string Path to a file to use as an example.
- * May also be an absolute URI.
- */
- public function getFilePath()
- {
- return $this->filePath;
- }
-
- /**
- * Sets the file path.
- *
- * @param string $filePath The new file path to use for the example.
- *
- * @return $this
- */
- public function setFilePath($filePath)
- {
- $this->isURI = false;
- $this->filePath = trim($filePath);
-
- $this->content = null;
- return $this;
- }
-
- /**
- * Sets the file path as an URI.
- *
- * This function is equivalent to {@link setFilePath()}, except that it
- * convers an URI to a file path before that.
- *
- * There is no getFileURI(), as {@link getFilePath()} is compatible.
- *
- * @param type $uri The new file URI to use as an example.
- */
- public function setFileURI($uri)
- {
- $this->isURI = true;
- if (false === strpos($uri, ':')) {
- //Relative URL
- $this->filePath = rawurldecode(
- str_replace(array('/', '\\'), '%2F', $uri)
- );
- } else {
- //Absolute URL or URI.
- $this->filePath = $uri;
- }
-
- $this->content = null;
- return $this;
- }
-}
diff --git a/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/LinkTag.php b/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/LinkTag.php
deleted file mode 100644
index f79f25dd8b2..00000000000
--- a/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/LinkTag.php
+++ /dev/null
@@ -1,81 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tag;
-
-use phpDocumentor\Reflection\DocBlock\Tag;
-
-/**
- * Reflection class for a @link tag in a Docblock.
- *
- * @author Ben Selby
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class LinkTag extends Tag
-{
- /** @var string */
- protected $link = '';
-
- /**
- * {@inheritdoc}
- */
- public function getContent()
- {
- if (null === $this->content) {
- $this->content = "{$this->link} {$this->description}";
- }
-
- return $this->content;
- }
-
- /**
- * {@inheritdoc}
- */
- public function setContent($content)
- {
- parent::setContent($content);
- $parts = preg_split('/\s+/Su', $this->description, 2);
-
- $this->link = $parts[0];
-
- $this->setDescription(isset($parts[1]) ? $parts[1] : $parts[0]);
-
- $this->content = $content;
- return $this;
- }
-
- /**
- * Gets the link
- *
- * @return string
- */
- public function getLink()
- {
- return $this->link;
- }
-
- /**
- * Sets the link
- *
- * @param string $link The link
- *
- * @return $this
- */
- public function setLink($link)
- {
- $this->link = $link;
-
- $this->content = null;
- return $this;
- }
-}
diff --git a/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/MethodTag.php b/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/MethodTag.php
deleted file mode 100644
index 7a5ce790821..00000000000
--- a/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/MethodTag.php
+++ /dev/null
@@ -1,209 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tag;
-
-use phpDocumentor\Reflection\DocBlock\Tag;
-
-/**
- * Reflection class for a @method in a Docblock.
- *
- * @author Mike van Riel
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class MethodTag extends ReturnTag
-{
-
- /** @var string */
- protected $method_name = '';
-
- /** @var string */
- protected $arguments = '';
-
- /** @var bool */
- protected $isStatic = false;
-
- /**
- * {@inheritdoc}
- */
- public function getContent()
- {
- if (null === $this->content) {
- $this->content = '';
- if ($this->isStatic) {
- $this->content .= 'static ';
- }
- $this->content .= $this->type .
- " {$this->method_name}({$this->arguments}) " .
- $this->description;
- }
-
- return $this->content;
- }
-
- /**
- * {@inheritdoc}
- */
- public function setContent($content)
- {
- Tag::setContent($content);
- // 1. none or more whitespace
- // 2. optionally the keyword "static" followed by whitespace
- // 3. optionally a word with underscores followed by whitespace : as
- // type for the return value
- // 4. then optionally a word with underscores followed by () and
- // whitespace : as method name as used by phpDocumentor
- // 5. then a word with underscores, followed by ( and any character
- // until a ) and whitespace : as method name with signature
- // 6. any remaining text : as description
- if (preg_match(
- '/^
- # Static keyword
- # Declates a static method ONLY if type is also present
- (?:
- (static)
- \s+
- )?
- # Return type
- (?:
- ([\w\|_\\\\]+)
- \s+
- )?
- # Legacy method name (not captured)
- (?:
- [\w_]+\(\)\s+
- )?
- # Method name
- ([\w\|_\\\\]+)
- # Arguments
- \(([^\)]*)\)
- \s*
- # Description
- (.*)
- $/sux',
- $this->description,
- $matches
- )) {
- list(
- ,
- $static,
- $this->type,
- $this->method_name,
- $this->arguments,
- $this->description
- ) = $matches;
- if ($static) {
- if (!$this->type) {
- $this->type = 'static';
- } else {
- $this->isStatic = true;
- }
- } else {
- if (!$this->type) {
- $this->type = 'void';
- }
- }
- $this->parsedDescription = null;
- }
-
- return $this;
- }
-
- /**
- * Sets the name of this method.
- *
- * @param string $method_name The name of the method.
- *
- * @return $this
- */
- public function setMethodName($method_name)
- {
- $this->method_name = $method_name;
-
- $this->content = null;
- return $this;
- }
-
- /**
- * Retrieves the method name.
- *
- * @return string
- */
- public function getMethodName()
- {
- return $this->method_name;
- }
-
- /**
- * Sets the arguments for this method.
- *
- * @param string $arguments A comma-separated arguments line.
- *
- * @return void
- */
- public function setArguments($arguments)
- {
- $this->arguments = $arguments;
-
- $this->content = null;
- return $this;
- }
-
- /**
- * Returns an array containing each argument as array of type and name.
- *
- * Please note that the argument sub-array may only contain 1 element if no
- * type was specified.
- *
- * @return string[]
- */
- public function getArguments()
- {
- if (empty($this->arguments)) {
- return array();
- }
-
- $arguments = explode(',', $this->arguments);
- foreach ($arguments as $key => $value) {
- $arguments[$key] = explode(' ', trim($value));
- }
-
- return $arguments;
- }
-
- /**
- * Checks whether the method tag describes a static method or not.
- *
- * @return bool TRUE if the method declaration is for a static method, FALSE
- * otherwise.
- */
- public function isStatic()
- {
- return $this->isStatic;
- }
-
- /**
- * Sets a new value for whether the method is static or not.
- *
- * @param bool $isStatic The new value to set.
- *
- * @return $this
- */
- public function setIsStatic($isStatic)
- {
- $this->isStatic = $isStatic;
-
- $this->content = null;
- return $this;
- }
-}
diff --git a/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/ParamTag.php b/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/ParamTag.php
deleted file mode 100644
index 9bc0270dd9a..00000000000
--- a/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/ParamTag.php
+++ /dev/null
@@ -1,119 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tag;
-
-use phpDocumentor\Reflection\DocBlock\Tag;
-
-/**
- * Reflection class for a @param tag in a Docblock.
- *
- * @author Mike van Riel
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class ParamTag extends ReturnTag
-{
- /** @var string */
- protected $variableName = '';
-
- /** @var bool determines whether this is a variadic argument */
- protected $isVariadic = false;
-
- /**
- * {@inheritdoc}
- */
- public function getContent()
- {
- if (null === $this->content) {
- $this->content
- = "{$this->type} {$this->variableName} {$this->description}";
- }
- return $this->content;
- }
- /**
- * {@inheritdoc}
- */
- public function setContent($content)
- {
- Tag::setContent($content);
- $parts = preg_split(
- '/(\s+)/Su',
- $this->description,
- 3,
- PREG_SPLIT_DELIM_CAPTURE
- );
-
- // if the first item that is encountered is not a variable; it is a type
- if (isset($parts[0])
- && (strlen($parts[0]) > 0)
- && ($parts[0][0] !== '$')
- ) {
- $this->type = array_shift($parts);
- array_shift($parts);
- }
-
- // if the next item starts with a $ or ...$ it must be the variable name
- if (isset($parts[0])
- && (strlen($parts[0]) > 0)
- && ($parts[0][0] == '$' || substr($parts[0], 0, 4) === '...$')
- ) {
- $this->variableName = array_shift($parts);
- array_shift($parts);
-
- if (substr($this->variableName, 0, 3) === '...') {
- $this->isVariadic = true;
- $this->variableName = substr($this->variableName, 3);
- }
- }
-
- $this->setDescription(implode('', $parts));
-
- $this->content = $content;
- return $this;
- }
-
- /**
- * Returns the variable's name.
- *
- * @return string
- */
- public function getVariableName()
- {
- return $this->variableName;
- }
-
- /**
- * Sets the variable's name.
- *
- * @param string $name The new name for this variable.
- *
- * @return $this
- */
- public function setVariableName($name)
- {
- $this->variableName = $name;
-
- $this->content = null;
- return $this;
- }
-
- /**
- * Returns whether this tag is variadic.
- *
- * @return boolean
- */
- public function isVariadic()
- {
- return $this->isVariadic;
- }
-}
diff --git a/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/PropertyReadTag.php b/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/PropertyReadTag.php
deleted file mode 100644
index 33406026a11..00000000000
--- a/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/PropertyReadTag.php
+++ /dev/null
@@ -1,24 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tag;
-
-/**
- * Reflection class for a @property-read tag in a Docblock.
- *
- * @author Mike van Riel
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class PropertyReadTag extends PropertyTag
-{
-}
diff --git a/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/PropertyTag.php b/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/PropertyTag.php
deleted file mode 100644
index 288ecff872c..00000000000
--- a/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/PropertyTag.php
+++ /dev/null
@@ -1,24 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tag;
-
-/**
- * Reflection class for a @property tag in a Docblock.
- *
- * @author Mike van Riel
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class PropertyTag extends ParamTag
-{
-}
diff --git a/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/PropertyWriteTag.php b/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/PropertyWriteTag.php
deleted file mode 100644
index ec4e866d438..00000000000
--- a/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/PropertyWriteTag.php
+++ /dev/null
@@ -1,24 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tag;
-
-/**
- * Reflection class for a @property-write tag in a Docblock.
- *
- * @author Mike van Riel
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class PropertyWriteTag extends PropertyTag
-{
-}
diff --git a/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/ReturnTag.php b/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/ReturnTag.php
deleted file mode 100644
index 9293db9246b..00000000000
--- a/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/ReturnTag.php
+++ /dev/null
@@ -1,99 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tag;
-
-use phpDocumentor\Reflection\DocBlock\Tag;
-use phpDocumentor\Reflection\DocBlock\Type\Collection;
-
-/**
- * Reflection class for a @return tag in a Docblock.
- *
- * @author Mike van Riel
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class ReturnTag extends Tag
-{
- /** @var string The raw type component. */
- protected $type = '';
-
- /** @var Collection The parsed type component. */
- protected $types = null;
-
- /**
- * {@inheritdoc}
- */
- public function getContent()
- {
- if (null === $this->content) {
- $this->content = "{$this->type} {$this->description}";
- }
-
- return $this->content;
- }
-
- /**
- * {@inheritdoc}
- */
- public function setContent($content)
- {
- parent::setContent($content);
-
- $parts = preg_split('/\s+/Su', $this->description, 2);
-
- // any output is considered a type
- $this->type = $parts[0];
- $this->types = null;
-
- $this->setDescription(isset($parts[1]) ? $parts[1] : '');
-
- $this->content = $content;
- return $this;
- }
-
- /**
- * Returns the unique types of the variable.
- *
- * @return string[]
- */
- public function getTypes()
- {
- return $this->getTypesCollection()->getArrayCopy();
- }
-
- /**
- * Returns the type section of the variable.
- *
- * @return string
- */
- public function getType()
- {
- return (string) $this->getTypesCollection();
- }
-
- /**
- * Returns the type collection.
- *
- * @return void
- */
- protected function getTypesCollection()
- {
- if (null === $this->types) {
- $this->types = new Collection(
- array($this->type),
- $this->docblock ? $this->docblock->getContext() : null
- );
- }
- return $this->types;
- }
-}
diff --git a/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/SeeTag.php b/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/SeeTag.php
deleted file mode 100644
index 4f5f22ce17d..00000000000
--- a/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/SeeTag.php
+++ /dev/null
@@ -1,81 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tag;
-
-use phpDocumentor\Reflection\DocBlock\Tag;
-
-/**
- * Reflection class for a @see tag in a Docblock.
- *
- * @author Mike van Riel
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class SeeTag extends Tag
-{
- /** @var string */
- protected $refers = null;
-
- /**
- * {@inheritdoc}
- */
- public function getContent()
- {
- if (null === $this->content) {
- $this->content = "{$this->refers} {$this->description}";
- }
- return $this->content;
- }
-
- /**
- * {@inheritdoc}
- */
- public function setContent($content)
- {
- parent::setContent($content);
- $parts = preg_split('/\s+/Su', $this->description, 2);
-
- // any output is considered a type
- $this->refers = $parts[0];
-
- $this->setDescription(isset($parts[1]) ? $parts[1] : '');
-
- $this->content = $content;
- return $this;
- }
-
- /**
- * Gets the structural element this tag refers to.
- *
- * @return string
- */
- public function getReference()
- {
- return $this->refers;
- }
-
- /**
- * Sets the structural element this tag refers to.
- *
- * @param string $refers The new type this tag refers to.
- *
- * @return $this
- */
- public function setReference($refers)
- {
- $this->refers = $refers;
-
- $this->content = null;
- return $this;
- }
-}
diff --git a/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/SinceTag.php b/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/SinceTag.php
deleted file mode 100644
index ba009c44733..00000000000
--- a/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/SinceTag.php
+++ /dev/null
@@ -1,26 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tag;
-
-use phpDocumentor\Reflection\DocBlock\Tag\VersionTag;
-
-/**
- * Reflection class for a @since tag in a Docblock.
- *
- * @author Vasil Rangelov
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class SinceTag extends VersionTag
-{
-}
diff --git a/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/SourceTag.php b/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/SourceTag.php
deleted file mode 100644
index 3400220ea7c..00000000000
--- a/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/SourceTag.php
+++ /dev/null
@@ -1,137 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tag;
-
-use phpDocumentor\Reflection\DocBlock\Tag;
-
-/**
- * Reflection class for a @source tag in a Docblock.
- *
- * @author Vasil Rangelov
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class SourceTag extends Tag
-{
- /**
- * @var int The starting line, relative to the structural element's
- * location.
- */
- protected $startingLine = 1;
-
- /**
- * @var int|null The number of lines, relative to the starting line. NULL
- * means "to the end".
- */
- protected $lineCount = null;
-
- /**
- * {@inheritdoc}
- */
- public function getContent()
- {
- if (null === $this->content) {
- $this->content
- = "{$this->startingLine} {$this->lineCount} {$this->description}";
- }
-
- return $this->content;
- }
-
- /**
- * {@inheritdoc}
- */
- public function setContent($content)
- {
- parent::setContent($content);
- if (preg_match(
- '/^
- # Starting line
- ([1-9]\d*)
- \s*
- # Number of lines
- (?:
- ((?1))
- \s+
- )?
- # Description
- (.*)
- $/sux',
- $this->description,
- $matches
- )) {
- $this->startingLine = (int)$matches[1];
- if (isset($matches[2]) && '' !== $matches[2]) {
- $this->lineCount = (int)$matches[2];
- }
- $this->setDescription($matches[3]);
- $this->content = $content;
- }
-
- return $this;
- }
-
- /**
- * Gets the starting line.
- *
- * @return int The starting line, relative to the structural element's
- * location.
- */
- public function getStartingLine()
- {
- return $this->startingLine;
- }
-
- /**
- * Sets the starting line.
- *
- * @param int $startingLine The new starting line, relative to the
- * structural element's location.
- *
- * @return $this
- */
- public function setStartingLine($startingLine)
- {
- $this->startingLine = $startingLine;
-
- $this->content = null;
- return $this;
- }
-
- /**
- * Returns the number of lines.
- *
- * @return int|null The number of lines, relative to the starting line. NULL
- * means "to the end".
- */
- public function getLineCount()
- {
- return $this->lineCount;
- }
-
- /**
- * Sets the number of lines.
- *
- * @param int|null $lineCount The new number of lines, relative to the
- * starting line. NULL means "to the end".
- *
- * @return $this
- */
- public function setLineCount($lineCount)
- {
- $this->lineCount = $lineCount;
-
- $this->content = null;
- return $this;
- }
-}
diff --git a/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/ThrowsTag.php b/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/ThrowsTag.php
deleted file mode 100644
index 58ee44a42d2..00000000000
--- a/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/ThrowsTag.php
+++ /dev/null
@@ -1,24 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tag;
-
-/**
- * Reflection class for a @throws tag in a Docblock.
- *
- * @author Mike van Riel
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class ThrowsTag extends ReturnTag
-{
-}
diff --git a/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/UsesTag.php b/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/UsesTag.php
deleted file mode 100644
index da0d66381ec..00000000000
--- a/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/UsesTag.php
+++ /dev/null
@@ -1,24 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tag;
-
-/**
- * Reflection class for a @uses tag in a Docblock.
- *
- * @author Mike van Riel
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class UsesTag extends SeeTag
-{
-}
diff --git a/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/VarTag.php b/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/VarTag.php
deleted file mode 100644
index 236b2c8b01e..00000000000
--- a/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/VarTag.php
+++ /dev/null
@@ -1,24 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tag;
-
-/**
- * Reflection class for a @var tag in a Docblock.
- *
- * @author Mike van Riel
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class VarTag extends ParamTag
-{
-}
diff --git a/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/VersionTag.php b/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/VersionTag.php
deleted file mode 100644
index 260f6984f4d..00000000000
--- a/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/VersionTag.php
+++ /dev/null
@@ -1,108 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tag;
-
-use phpDocumentor\Reflection\DocBlock\Tag;
-
-/**
- * Reflection class for a @version tag in a Docblock.
- *
- * @author Vasil Rangelov
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class VersionTag extends Tag
-{
- /**
- * PCRE regular expression matching a version vector.
- * Assumes the "x" modifier.
- */
- const REGEX_VECTOR = '(?:
- # Normal release vectors.
- \d\S*
- |
- # VCS version vectors. Per PHPCS, they are expected to
- # follow the form of the VCS name, followed by ":", followed
- # by the version vector itself.
- # By convention, popular VCSes like CVS, SVN and GIT use "$"
- # around the actual version vector.
- [^\s\:]+\:\s*\$[^\$]+\$
- )';
-
- /** @var string The version vector. */
- protected $version = '';
-
- public function getContent()
- {
- if (null === $this->content) {
- $this->content = "{$this->version} {$this->description}";
- }
-
- return $this->content;
- }
-
- /**
- * {@inheritdoc}
- */
- public function setContent($content)
- {
- parent::setContent($content);
-
- if (preg_match(
- '/^
- # The version vector
- (' . self::REGEX_VECTOR . ')
- \s*
- # The description
- (.+)?
- $/sux',
- $this->description,
- $matches
- )) {
- $this->version = $matches[1];
- $this->setDescription(isset($matches[2]) ? $matches[2] : '');
- $this->content = $content;
- }
-
- return $this;
- }
-
- /**
- * Gets the version section of the tag.
- *
- * @return string The version section of the tag.
- */
- public function getVersion()
- {
- return $this->version;
- }
-
- /**
- * Sets the version section of the tag.
- *
- * @param string $version The new version section of the tag.
- * An invalid value will set an empty string.
- *
- * @return $this
- */
- public function setVersion($version)
- {
- $this->version
- = preg_match('/^' . self::REGEX_VECTOR . '$/ux', $version)
- ? $version
- : '';
-
- $this->content = null;
- return $this;
- }
-}
diff --git a/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Type/Collection.php b/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Type/Collection.php
deleted file mode 100644
index 327819c2c37..00000000000
--- a/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Type/Collection.php
+++ /dev/null
@@ -1,228 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Type;
-
-use phpDocumentor\Reflection\DocBlock\Context;
-
-/**
- * Collection
- *
- * @author Mike van Riel
- * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class Collection extends \ArrayObject
-{
- /** @var string Definition of the OR operator for types */
- const OPERATOR_OR = '|';
-
- /** @var string Definition of the ARRAY operator for types */
- const OPERATOR_ARRAY = '[]';
-
- /** @var string Definition of the NAMESPACE operator in PHP */
- const OPERATOR_NAMESPACE = '\\';
-
- /** @var string[] List of recognized keywords */
- protected static $keywords = array(
- 'string', 'int', 'integer', 'bool', 'boolean', 'float', 'double',
- 'object', 'mixed', 'array', 'resource', 'void', 'null', 'scalar',
- 'callback', 'callable', 'false', 'true', 'self', '$this', 'static'
- );
-
- /**
- * Current invoking location.
- *
- * This is used to prepend to type with a relative location.
- * May also be 'default' or 'global', in which case they are ignored.
- *
- * @var Context
- */
- protected $context = null;
-
- /**
- * Registers the namespace and aliases; uses that to add and expand the
- * given types.
- *
- * @param string[] $types Array containing a list of types to add to this
- * container.
- * @param Context $location The current invoking location.
- */
- public function __construct(
- array $types = array(),
- Context $context = null
- ) {
- $this->context = null === $context ? new Context() : $context;
-
- foreach ($types as $type) {
- $this->add($type);
- }
- }
-
- /**
- * Returns the current invoking location.
- *
- * @return Context
- */
- public function getContext()
- {
- return $this->context;
- }
-
- /**
- * Adds a new type to the collection and expands it if it contains a
- * relative namespace.
- *
- * If a class in the type contains a relative namespace than this collection
- * will try to expand that into a FQCN.
- *
- * @param string $type A 'Type' as defined in the phpDocumentor
- * documentation.
- *
- * @throws \InvalidArgumentException if a non-string argument is passed.
- *
- * @see http://phpdoc.org/docs/latest/for-users/types.html for the
- * definition of a type.
- *
- * @return void
- */
- public function add($type)
- {
- if (!is_string($type)) {
- throw new \InvalidArgumentException(
- 'A type should be represented by a string, received: '
- .var_export($type, true)
- );
- }
-
- // separate the type by the OR operator
- $type_parts = explode(self::OPERATOR_OR, $type);
- foreach ($type_parts as $part) {
- $expanded_type = $this->expand($part);
- if ($expanded_type) {
- $this[] = $expanded_type;
- }
- }
- }
-
- /**
- * Returns a string representation of the collection.
- *
- * @return string The resolved types across the collection, separated with
- * {@link self::OPERATOR_OR}.
- */
- public function __toString()
- {
- return implode(self::OPERATOR_OR, $this->getArrayCopy());
- }
-
- /**
- * Analyzes the given type and returns the FQCN variant.
- *
- * When a type is provided this method checks whether it is not a keyword or
- * Fully Qualified Class Name. If so it will use the given namespace and
- * aliases to expand the type to a FQCN representation.
- *
- * This method only works as expected if the namespace and aliases are set;
- * no dynamic reflection is being performed here.
- *
- * @param string $type The relative or absolute type.
- *
- * @uses getNamespace to determine with what to prefix the type name.
- * @uses getNamespaceAliases to check whether the first part of the relative
- * type name should not be replaced with another namespace.
- *
- * @return string
- */
- protected function expand($type)
- {
- $type = trim($type);
- if (!$type) {
- return '';
- }
-
- if ($this->isTypeAnArray($type)) {
- return $this->expand(substr($type, 0, -2)) . self::OPERATOR_ARRAY;
- }
-
- if ($this->isRelativeType($type) && !$this->isTypeAKeyword($type)) {
- $type_parts = explode(self::OPERATOR_NAMESPACE, $type, 2);
-
- $namespace_aliases = $this->context->getNamespaceAliases();
- // if the first segment is not an alias; prepend namespace name and
- // return
- if (!isset($namespace_aliases[$type_parts[0]]) &&
- !isset($namespace_aliases[strstr($type_parts[0], '::', true)])) {
- $namespace = $this->context->getNamespace();
- if ('' !== $namespace) {
- $namespace .= self::OPERATOR_NAMESPACE;
- }
- return self::OPERATOR_NAMESPACE . $namespace . $type;
- }
-
- if (strpos($type_parts[0], '::')) {
- $type_parts[] = strstr($type_parts[0], '::');
- $type_parts[0] = $namespace_aliases[strstr($type_parts[0], '::', true)];
- return implode('', $type_parts);
- }
-
- $type_parts[0] = $namespace_aliases[$type_parts[0]];
- $type = implode(self::OPERATOR_NAMESPACE, $type_parts);
- }
-
- return $type;
- }
-
- /**
- * Detects whether the given type represents an array.
- *
- * @param string $type A relative or absolute type as defined in the
- * phpDocumentor documentation.
- *
- * @return bool
- */
- protected function isTypeAnArray($type)
- {
- return substr($type, -2) === self::OPERATOR_ARRAY;
- }
-
- /**
- * Detects whether the given type represents a PHPDoc keyword.
- *
- * @param string $type A relative or absolute type as defined in the
- * phpDocumentor documentation.
- *
- * @return bool
- */
- protected function isTypeAKeyword($type)
- {
- return in_array(strtolower($type), static::$keywords, true);
- }
-
- /**
- * Detects whether the given type represents a relative or absolute path.
- *
- * This method will detect keywords as being absolute; even though they are
- * not preceeded by a namespace separator.
- *
- * @param string $type A relative or absolute type as defined in the
- * phpDocumentor documentation.
- *
- * @return bool
- */
- protected function isRelativeType($type)
- {
- return ($type[0] !== self::OPERATOR_NAMESPACE)
- || $this->isTypeAKeyword($type);
- }
-}
diff --git a/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/DescriptionTest.php b/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/DescriptionTest.php
deleted file mode 100644
index a6ca7b37e40..00000000000
--- a/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/DescriptionTest.php
+++ /dev/null
@@ -1,245 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock;
-
-/**
- * Test class for \phpDocumentor\Reflection\DocBlock\Description
- *
- * @author Vasil Rangelov
- * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class DescriptionTest extends \PHPUnit_Framework_TestCase
-{
- public function testConstruct()
- {
- $fixture = <<assertSame($fixture, $object->getContents());
-
- $parsedContents = $object->getParsedContents();
- $this->assertCount(1, $parsedContents);
- $this->assertSame($fixture, $parsedContents[0]);
- }
-
- public function testInlineTagParsing()
- {
- $fixture = <<assertSame($fixture, $object->getContents());
-
- $parsedContents = $object->getParsedContents();
- $this->assertCount(3, $parsedContents);
- $this->assertSame('This is text for a ', $parsedContents[0]);
- $this->assertInstanceOf(
- __NAMESPACE__ . '\Tag\LinkTag',
- $parsedContents[1]
- );
- $this->assertSame(
- ' that uses inline
-tags.',
- $parsedContents[2]
- );
- }
-
- public function testInlineTagAtStartParsing()
- {
- $fixture = <<assertSame($fixture, $object->getContents());
-
- $parsedContents = $object->getParsedContents();
- $this->assertCount(3, $parsedContents);
-
- $this->assertSame('', $parsedContents[0]);
- $this->assertInstanceOf(
- __NAMESPACE__ . '\Tag\LinkTag',
- $parsedContents[1]
- );
- $this->assertSame(
- ' is text for a description that uses inline
-tags.',
- $parsedContents[2]
- );
- }
-
- public function testNestedInlineTagParsing()
- {
- $fixture = <<assertSame($fixture, $object->getContents());
-
- $parsedContents = $object->getParsedContents();
- $this->assertCount(3, $parsedContents);
-
- $this->assertSame(
- 'This is text for a description with ',
- $parsedContents[0]
- );
- $this->assertInstanceOf(
- __NAMESPACE__ . '\Tag',
- $parsedContents[1]
- );
- $this->assertSame('.', $parsedContents[2]);
-
- $parsedDescription = $parsedContents[1]->getParsedDescription();
- $this->assertCount(3, $parsedDescription);
- $this->assertSame("inline tag with\n", $parsedDescription[0]);
- $this->assertInstanceOf(
- __NAMESPACE__ . '\Tag\LinkTag',
- $parsedDescription[1]
- );
- $this->assertSame(' in it', $parsedDescription[2]);
- }
-
- public function testLiteralOpeningDelimiter()
- {
- $fixture = <<assertSame($fixture, $object->getContents());
-
- $parsedContents = $object->getParsedContents();
- $this->assertCount(1, $parsedContents);
- $this->assertSame($fixture, $parsedContents[0]);
- }
-
- public function testNestedLiteralOpeningDelimiter()
- {
- $fixture = <<assertSame($fixture, $object->getContents());
-
- $parsedContents = $object->getParsedContents();
- $this->assertCount(3, $parsedContents);
- $this->assertSame(
- 'This is text for a description containing ',
- $parsedContents[0]
- );
- $this->assertInstanceOf(
- __NAMESPACE__ . '\Tag',
- $parsedContents[1]
- );
- $this->assertSame('.', $parsedContents[2]);
-
- $this->assertSame(
- array('inline tag that has { that
-is literal'),
- $parsedContents[1]->getParsedDescription()
- );
- }
-
- public function testLiteralClosingDelimiter()
- {
- $fixture = <<assertSame($fixture, $object->getContents());
-
- $parsedContents = $object->getParsedContents();
- $this->assertCount(1, $parsedContents);
- $this->assertSame(
- 'This is text for a description with } that is not a tag.',
- $parsedContents[0]
- );
- }
-
- public function testNestedLiteralClosingDelimiter()
- {
- $fixture = <<assertSame($fixture, $object->getContents());
-
- $parsedContents = $object->getParsedContents();
- $this->assertCount(3, $parsedContents);
- $this->assertSame(
- 'This is text for a description with ',
- $parsedContents[0]
- );
- $this->assertInstanceOf(
- __NAMESPACE__ . '\Tag',
- $parsedContents[1]
- );
- $this->assertSame('.', $parsedContents[2]);
-
- $this->assertSame(
- array('inline tag with } that is not an
-inline tag'),
- $parsedContents[1]->getParsedDescription()
- );
- }
-
- public function testInlineTagEscapingSequence()
- {
- $fixture = <<assertSame($fixture, $object->getContents());
-
- $parsedContents = $object->getParsedContents();
- $this->assertCount(1, $parsedContents);
- $this->assertSame(
- 'This is text for a description with literal {@link}.',
- $parsedContents[0]
- );
- }
-
- public function testNestedInlineTagEscapingSequence()
- {
- $fixture = <<assertSame($fixture, $object->getContents());
-
- $parsedContents = $object->getParsedContents();
- $this->assertCount(3, $parsedContents);
- $this->assertSame(
- 'This is text for a description with an ',
- $parsedContents[0]
- );
- $this->assertInstanceOf(
- __NAMESPACE__ . '\Tag',
- $parsedContents[1]
- );
- $this->assertSame('.', $parsedContents[2]);
-
- $this->assertSame(
- array('inline tag with literal
-{@link} in it'),
- $parsedContents[1]->getParsedDescription()
- );
- }
-}
diff --git a/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/CoversTagTest.php b/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/CoversTagTest.php
deleted file mode 100644
index ff257aa197c..00000000000
--- a/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/CoversTagTest.php
+++ /dev/null
@@ -1,86 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tag;
-
-/**
- * Test class for \phpDocumentor\Reflection\DocBlock\Tag\CoversTag
- *
- * @author Daniel O'Connor
- * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class CoversTagTest extends \PHPUnit_Framework_TestCase
-{
- /**
- * Test that the \phpDocumentor\Reflection\DocBlock\Tag\CoversTag can create
- * a link for the covers doc block.
- *
- * @param string $type
- * @param string $content
- * @param string $exContent
- * @param string $exReference
- *
- * @covers \phpDocumentor\Reflection\DocBlock\Tag\CoversTag
- * @dataProvider provideDataForConstuctor
- *
- * @return void
- */
- public function testConstructorParesInputsIntoCorrectFields(
- $type,
- $content,
- $exContent,
- $exDescription,
- $exReference
- ) {
- $tag = new CoversTag($type, $content);
-
- $this->assertEquals($type, $tag->getName());
- $this->assertEquals($exContent, $tag->getContent());
- $this->assertEquals($exDescription, $tag->getDescription());
- $this->assertEquals($exReference, $tag->getReference());
- }
-
- /**
- * Data provider for testConstructorParesInputsIntoCorrectFields
- *
- * @return array
- */
- public function provideDataForConstuctor()
- {
- // $type, $content, $exContent, $exDescription, $exReference
- return array(
- array(
- 'covers',
- 'Foo::bar()',
- 'Foo::bar()',
- '',
- 'Foo::bar()'
- ),
- array(
- 'covers',
- 'Foo::bar() Testing',
- 'Foo::bar() Testing',
- 'Testing',
- 'Foo::bar()',
- ),
- array(
- 'covers',
- 'Foo::bar() Testing comments',
- 'Foo::bar() Testing comments',
- 'Testing comments',
- 'Foo::bar()',
- ),
- );
- }
-}
diff --git a/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/DeprecatedTagTest.php b/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/DeprecatedTagTest.php
deleted file mode 100644
index 7a75e79ce55..00000000000
--- a/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/DeprecatedTagTest.php
+++ /dev/null
@@ -1,115 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tag;
-
-/**
- * Test class for \phpDocumentor\Reflection\DocBlock\Tag\DeprecatedTag
- *
- * @author Vasil Rangelov
- * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class DeprecatedTagTest extends \PHPUnit_Framework_TestCase
-{
- /**
- * Test that the \phpDocumentor\Reflection\DocBlock\Tag\LinkTag can create
- * a link for the @deprecated doc block.
- *
- * @param string $type
- * @param string $content
- * @param string $exContent
- * @param string $exDescription
- * @param string $exVersion
- *
- * @covers \phpDocumentor\Reflection\DocBlock\Tag\DeprecatedTag
- * @dataProvider provideDataForConstuctor
- *
- * @return void
- */
- public function testConstructorParesInputsIntoCorrectFields(
- $type,
- $content,
- $exContent,
- $exDescription,
- $exVersion
- ) {
- $tag = new DeprecatedTag($type, $content);
-
- $this->assertEquals($type, $tag->getName());
- $this->assertEquals($exContent, $tag->getContent());
- $this->assertEquals($exDescription, $tag->getDescription());
- $this->assertEquals($exVersion, $tag->getVersion());
- }
-
- /**
- * Data provider for testConstructorParesInputsIntoCorrectFields
- *
- * @return array
- */
- public function provideDataForConstuctor()
- {
- // $type, $content, $exContent, $exDescription, $exVersion
- return array(
- array(
- 'deprecated',
- '1.0 First release.',
- '1.0 First release.',
- 'First release.',
- '1.0'
- ),
- array(
- 'deprecated',
- "1.0\nFirst release.",
- "1.0\nFirst release.",
- 'First release.',
- '1.0'
- ),
- array(
- 'deprecated',
- "1.0\nFirst\nrelease.",
- "1.0\nFirst\nrelease.",
- "First\nrelease.",
- '1.0'
- ),
- array(
- 'deprecated',
- 'Unfinished release',
- 'Unfinished release',
- 'Unfinished release',
- ''
- ),
- array(
- 'deprecated',
- '1.0',
- '1.0',
- '',
- '1.0'
- ),
- array(
- 'deprecated',
- 'GIT: $Id$',
- 'GIT: $Id$',
- '',
- 'GIT: $Id$'
- ),
- array(
- 'deprecated',
- 'GIT: $Id$ Dev build',
- 'GIT: $Id$ Dev build',
- 'Dev build',
- 'GIT: $Id$'
- )
- );
- }
-}
diff --git a/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/ExampleTagTest.php b/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/ExampleTagTest.php
deleted file mode 100644
index 519a61b3a9f..00000000000
--- a/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/ExampleTagTest.php
+++ /dev/null
@@ -1,203 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tag;
-
-/**
- * Test class for \phpDocumentor\Reflection\DocBlock\Tag\ExampleTag
- *
- * @author Vasil Rangelov
- * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class ExampleTagTest extends \PHPUnit_Framework_TestCase
-{
- /**
- * Test that the \phpDocumentor\Reflection\DocBlock\Tag\SourceTag can
- * understand the @source DocBlock.
- *
- * @param string $type
- * @param string $content
- * @param string $exContent
- * @param string $exStartingLine
- * @param string $exLineCount
- * @param string $exFilepath
- *
- * @covers \phpDocumentor\Reflection\DocBlock\Tag\ExampleTag
- * @dataProvider provideDataForConstuctor
- *
- * @return void
- */
- public function testConstructorParesInputsIntoCorrectFields(
- $type,
- $content,
- $exContent,
- $exDescription,
- $exStartingLine,
- $exLineCount,
- $exFilePath
- ) {
- $tag = new ExampleTag($type, $content);
-
- $this->assertEquals($type, $tag->getName());
- $this->assertEquals($exContent, $tag->getContent());
- $this->assertEquals($exDescription, $tag->getDescription());
- $this->assertEquals($exStartingLine, $tag->getStartingLine());
- $this->assertEquals($exLineCount, $tag->getLineCount());
- $this->assertEquals($exFilePath, $tag->getFilePath());
- }
-
- /**
- * Data provider for testConstructorParesInputsIntoCorrectFields
- *
- * @return array
- */
- public function provideDataForConstuctor()
- {
- // $type,
- // $content,
- // $exContent,
- // $exDescription,
- // $exStartingLine,
- // $exLineCount,
- // $exFilePath
- return array(
- array(
- 'example',
- 'file.php',
- 'file.php',
- '',
- 1,
- null,
- 'file.php'
- ),
- array(
- 'example',
- 'Testing comments',
- 'Testing comments',
- 'comments',
- 1,
- null,
- 'Testing'
- ),
- array(
- 'example',
- 'file.php 2 Testing',
- 'file.php 2 Testing',
- 'Testing',
- 2,
- null,
- 'file.php'
- ),
- array(
- 'example',
- 'file.php 2 3 Testing comments',
- 'file.php 2 3 Testing comments',
- 'Testing comments',
- 2,
- 3,
- 'file.php'
- ),
- array(
- 'example',
- 'file.php 2 -1 Testing comments',
- 'file.php 2 -1 Testing comments',
- '-1 Testing comments',
- 2,
- null,
- 'file.php'
- ),
- array(
- 'example',
- 'file.php -1 1 Testing comments',
- 'file.php -1 1 Testing comments',
- '-1 1 Testing comments',
- 1,
- null,
- 'file.php'
- ),
- array(
- 'example',
- '"file with spaces.php" Testing comments',
- '"file with spaces.php" Testing comments',
- 'Testing comments',
- 1,
- null,
- 'file with spaces.php'
- ),
- array(
- 'example',
- '"file with spaces.php" 2 Testing comments',
- '"file with spaces.php" 2 Testing comments',
- 'Testing comments',
- 2,
- null,
- 'file with spaces.php'
- ),
- array(
- 'example',
- '"file with spaces.php" 2 3 Testing comments',
- '"file with spaces.php" 2 3 Testing comments',
- 'Testing comments',
- 2,
- 3,
- 'file with spaces.php'
- ),
- array(
- 'example',
- '"file with spaces.php" 2 -3 Testing comments',
- '"file with spaces.php" 2 -3 Testing comments',
- '-3 Testing comments',
- 2,
- null,
- 'file with spaces.php'
- ),
- array(
- 'example',
- '"file with spaces.php" -2 3 Testing comments',
- '"file with spaces.php" -2 3 Testing comments',
- '-2 3 Testing comments',
- 1,
- null,
- 'file with spaces.php'
- ),
- array(
- 'example',
- 'file%20with%20spaces.php Testing comments',
- 'file%20with%20spaces.php Testing comments',
- 'Testing comments',
- 1,
- null,
- 'file with spaces.php'
- ),
- array(
- 'example',
- 'folder/file%20with%20spaces.php Testing comments',
- 'folder/file%20with%20spaces.php Testing comments',
- 'Testing comments',
- 1,
- null,
- 'folder/file with spaces.php'
- ),
- array(
- 'example',
- 'http://example.com/file%20with%20spaces.php Testing comments',
- 'http://example.com/file%20with%20spaces.php Testing comments',
- 'Testing comments',
- 1,
- null,
- 'http://example.com/file%20with%20spaces.php'
- )
- );
- }
-}
diff --git a/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/LinkTagTest.php b/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/LinkTagTest.php
deleted file mode 100644
index 0c64ed086ee..00000000000
--- a/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/LinkTagTest.php
+++ /dev/null
@@ -1,87 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tag;
-
-/**
- * Test class for \phpDocumentor\Reflection\DocBlock\Tag\LinkTag
- *
- * @author Ben Selby
- * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class LinkTagTest extends \PHPUnit_Framework_TestCase
-{
- /**
- * Test that the \phpDocumentor\Reflection\DocBlock\Tag\LinkTag can create
- * a link for the @link doc block.
- *
- * @param string $type
- * @param string $content
- * @param string $exContent
- * @param string $exDescription
- * @param string $exLink
- *
- * @covers \phpDocumentor\Reflection\DocBlock\Tag\LinkTag
- * @dataProvider provideDataForConstuctor
- *
- * @return void
- */
- public function testConstructorParesInputsIntoCorrectFields(
- $type,
- $content,
- $exContent,
- $exDescription,
- $exLink
- ) {
- $tag = new LinkTag($type, $content);
-
- $this->assertEquals($type, $tag->getName());
- $this->assertEquals($exContent, $tag->getContent());
- $this->assertEquals($exDescription, $tag->getDescription());
- $this->assertEquals($exLink, $tag->getLink());
- }
-
- /**
- * Data provider for testConstructorParesInputsIntoCorrectFields
- *
- * @return array
- */
- public function provideDataForConstuctor()
- {
- // $type, $content, $exContent, $exDescription, $exLink
- return array(
- array(
- 'link',
- 'http://www.phpdoc.org/',
- 'http://www.phpdoc.org/',
- 'http://www.phpdoc.org/',
- 'http://www.phpdoc.org/'
- ),
- array(
- 'link',
- 'http://www.phpdoc.org/ Testing',
- 'http://www.phpdoc.org/ Testing',
- 'Testing',
- 'http://www.phpdoc.org/'
- ),
- array(
- 'link',
- 'http://www.phpdoc.org/ Testing comments',
- 'http://www.phpdoc.org/ Testing comments',
- 'Testing comments',
- 'http://www.phpdoc.org/'
- ),
- );
- }
-}
diff --git a/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/MethodTagTest.php b/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/MethodTagTest.php
deleted file mode 100644
index efc3a15b538..00000000000
--- a/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/MethodTagTest.php
+++ /dev/null
@@ -1,146 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tag;
-
-/**
- * Test class for \phpDocumentor\Reflection\DocBlock\Tag\MethodTag
- *
- * @author Mike van Riel
- * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class MethodTagTest extends \PHPUnit_Framework_TestCase
-{
- /**
- * @param string $signature The signature to test.
- * @param bool $valid Whether the given signature is expected to
- * be valid.
- * @param string $expected_name The method name that is expected from this
- * signature.
- * @param string $expected_return The return type that is expected from this
- * signature.
- * @param bool $paramCount Number of parameters in the signature.
- * @param string $description The short description mentioned in the
- * signature.
- *
- * @covers \phpDocumentor\Reflection\DocBlock\Tag\MethodTag
- * @dataProvider getTestSignatures
- *
- * @return void
- */
- public function testConstruct(
- $signature,
- $valid,
- $expected_name,
- $expected_return,
- $expected_isStatic,
- $paramCount,
- $description
- ) {
- ob_start();
- $tag = new MethodTag('method', $signature);
- $stdout = ob_get_clean();
-
- $this->assertSame(
- $valid,
- empty($stdout),
- 'No error should have been output if the signature is valid'
- );
-
- if (!$valid) {
- return;
- }
-
- $this->assertEquals($expected_name, $tag->getMethodName());
- $this->assertEquals($expected_return, $tag->getType());
- $this->assertEquals($description, $tag->getDescription());
- $this->assertEquals($expected_isStatic, $tag->isStatic());
- $this->assertCount($paramCount, $tag->getArguments());
- }
-
- public function getTestSignatures()
- {
- return array(
- // TODO: Verify this case
-// array(
-// 'foo',
-// false, 'foo', '', false, 0, ''
-// ),
- array(
- 'foo()',
- true, 'foo', 'void', false, 0, ''
- ),
- array(
- 'foo() description',
- true, 'foo', 'void', false, 0, 'description'
- ),
- array(
- 'int foo()',
- true, 'foo', 'int', false, 0, ''
- ),
- array(
- 'int foo() description',
- true, 'foo', 'int', false, 0, 'description'
- ),
- array(
- 'int foo($a, $b)',
- true, 'foo', 'int', false, 2, ''
- ),
- array(
- 'int foo() foo(int $a, int $b)',
- true, 'foo', 'int', false, 2, ''
- ),
- array(
- 'int foo(int $a, int $b)',
- true, 'foo', 'int', false, 2, ''
- ),
- array(
- 'null|int foo(int $a, int $b)',
- true, 'foo', 'null|int', false, 2, ''
- ),
- array(
- 'int foo(null|int $a, int $b)',
- true, 'foo', 'int', false, 2, ''
- ),
- array(
- '\Exception foo() foo(Exception $a, Exception $b)',
- true, 'foo', '\Exception', false, 2, ''
- ),
- array(
- 'int foo() foo(Exception $a, Exception $b) description',
- true, 'foo', 'int', false, 2, 'description'
- ),
- array(
- 'int foo() foo(\Exception $a, \Exception $b) description',
- true, 'foo', 'int', false, 2, 'description'
- ),
- array(
- 'void()',
- true, 'void', 'void', false, 0, ''
- ),
- array(
- 'static foo()',
- true, 'foo', 'static', false, 0, ''
- ),
- array(
- 'static void foo()',
- true, 'foo', 'void', true, 0, ''
- ),
- array(
- 'static static foo()',
- true, 'foo', 'static', true, 0, ''
- )
- );
- }
-}
diff --git a/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/ParamTagTest.php b/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/ParamTagTest.php
deleted file mode 100644
index 0e05382fabe..00000000000
--- a/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/ParamTagTest.php
+++ /dev/null
@@ -1,118 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tag;
-
-/**
- * Test class for \phpDocumentor\Reflection\DocBlock\ParamTag
- *
- * @author Mike van Riel
- * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class ParamTagTest extends \PHPUnit_Framework_TestCase
-{
- /**
- * Test that the \phpDocumentor\Reflection\DocBlock\Tag\ParamTag can
- * understand the @param DocBlock.
- *
- * @param string $type
- * @param string $content
- * @param string $extractedType
- * @param string $extractedTypes
- * @param string $extractedVarName
- * @param string $extractedDescription
- *
- * @covers \phpDocumentor\Reflection\DocBlock\Tag\ParamTag
- * @dataProvider provideDataForConstructor
- *
- * @return void
- */
- public function testConstructorParsesInputsIntoCorrectFields(
- $type,
- $content,
- $extractedType,
- $extractedTypes,
- $extractedVarName,
- $extractedDescription
- ) {
- $tag = new ParamTag($type, $content);
-
- $this->assertEquals($type, $tag->getName());
- $this->assertEquals($extractedType, $tag->getType());
- $this->assertEquals($extractedTypes, $tag->getTypes());
- $this->assertEquals($extractedVarName, $tag->getVariableName());
- $this->assertEquals($extractedDescription, $tag->getDescription());
- }
-
- /**
- * Data provider for testConstructorParsesInputsIntoCorrectFields()
- *
- * @return array
- */
- public function provideDataForConstructor()
- {
- return array(
- array('param', 'int', 'int', array('int'), '', ''),
- array('param', '$bob', '', array(), '$bob', ''),
- array(
- 'param',
- 'int Number of bobs',
- 'int',
- array('int'),
- '',
- 'Number of bobs'
- ),
- array(
- 'param',
- 'int $bob',
- 'int',
- array('int'),
- '$bob',
- ''
- ),
- array(
- 'param',
- 'int $bob Number of bobs',
- 'int',
- array('int'),
- '$bob',
- 'Number of bobs'
- ),
- array(
- 'param',
- "int Description \n on multiple lines",
- 'int',
- array('int'),
- '',
- "Description \n on multiple lines"
- ),
- array(
- 'param',
- "int \n\$bob Variable name on a new line",
- 'int',
- array('int'),
- '$bob',
- "Variable name on a new line"
- ),
- array(
- 'param',
- "\nint \$bob Type on a new line",
- 'int',
- array('int'),
- '$bob',
- "Type on a new line"
- )
- );
- }
-}
diff --git a/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/ReturnTagTest.php b/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/ReturnTagTest.php
deleted file mode 100644
index 9e2aec0d190..00000000000
--- a/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/ReturnTagTest.php
+++ /dev/null
@@ -1,102 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tag;
-
-/**
- * Test class for \phpDocumentor\Reflection\DocBlock\ReturnTag
- *
- * @author Mike van Riel
- * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class ReturnTagTest extends \PHPUnit_Framework_TestCase
-{
- /**
- * Test that the \phpDocumentor\Reflection\DocBlock\Tag\ReturnTag can
- * understand the @return DocBlock.
- *
- * @param string $type
- * @param string $content
- * @param string $extractedType
- * @param string $extractedTypes
- * @param string $extractedDescription
- *
- * @covers \phpDocumentor\Reflection\DocBlock\Tag\ReturnTag
- * @dataProvider provideDataForConstructor
- *
- * @return void
- */
- public function testConstructorParsesInputsIntoCorrectFields(
- $type,
- $content,
- $extractedType,
- $extractedTypes,
- $extractedDescription
- ) {
- $tag = new ReturnTag($type, $content);
-
- $this->assertEquals($type, $tag->getName());
- $this->assertEquals($extractedType, $tag->getType());
- $this->assertEquals($extractedTypes, $tag->getTypes());
- $this->assertEquals($extractedDescription, $tag->getDescription());
- }
-
- /**
- * Data provider for testConstructorParsesInputsIntoCorrectFields()
- *
- * @return array
- */
- public function provideDataForConstructor()
- {
- return array(
- array('return', '', '', array(), ''),
- array('return', 'int', 'int', array('int'), ''),
- array(
- 'return',
- 'int Number of Bobs',
- 'int',
- array('int'),
- 'Number of Bobs'
- ),
- array(
- 'return',
- 'int|double Number of Bobs',
- 'int|double',
- array('int', 'double'),
- 'Number of Bobs'
- ),
- array(
- 'return',
- "int Number of \n Bobs",
- 'int',
- array('int'),
- "Number of \n Bobs"
- ),
- array(
- 'return',
- " int Number of Bobs",
- 'int',
- array('int'),
- "Number of Bobs"
- ),
- array(
- 'return',
- "int\nNumber of Bobs",
- 'int',
- array('int'),
- "Number of Bobs"
- )
- );
- }
-}
diff --git a/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/SeeTagTest.php b/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/SeeTagTest.php
deleted file mode 100644
index 6829b04605b..00000000000
--- a/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/SeeTagTest.php
+++ /dev/null
@@ -1,86 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tag;
-
-/**
- * Test class for \phpDocumentor\Reflection\DocBlock\Tag\SeeTag
- *
- * @author Daniel O'Connor
- * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class SeeTagTest extends \PHPUnit_Framework_TestCase
-{
- /**
- * Test that the phpDocumentor_Reflection_DocBlock_Tag_See can create a link
- * for the @see doc block.
- *
- * @param string $type
- * @param string $content
- * @param string $exContent
- * @param string $exReference
- *
- * @covers \phpDocumentor\Reflection\DocBlock\Tag\SeeTag
- * @dataProvider provideDataForConstuctor
- *
- * @return void
- */
- public function testConstructorParesInputsIntoCorrectFields(
- $type,
- $content,
- $exContent,
- $exDescription,
- $exReference
- ) {
- $tag = new SeeTag($type, $content);
-
- $this->assertEquals($type, $tag->getName());
- $this->assertEquals($exContent, $tag->getContent());
- $this->assertEquals($exDescription, $tag->getDescription());
- $this->assertEquals($exReference, $tag->getReference());
- }
-
- /**
- * Data provider for testConstructorParesInputsIntoCorrectFields
- *
- * @return array
- */
- public function provideDataForConstuctor()
- {
- // $type, $content, $exContent, $exDescription, $exReference
- return array(
- array(
- 'see',
- 'Foo::bar()',
- 'Foo::bar()',
- '',
- 'Foo::bar()'
- ),
- array(
- 'see',
- 'Foo::bar() Testing',
- 'Foo::bar() Testing',
- 'Testing',
- 'Foo::bar()',
- ),
- array(
- 'see',
- 'Foo::bar() Testing comments',
- 'Foo::bar() Testing comments',
- 'Testing comments',
- 'Foo::bar()',
- ),
- );
- }
-}
diff --git a/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/SinceTagTest.php b/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/SinceTagTest.php
deleted file mode 100644
index 8caf25d1cf0..00000000000
--- a/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/SinceTagTest.php
+++ /dev/null
@@ -1,115 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tag;
-
-/**
- * Test class for \phpDocumentor\Reflection\DocBlock\Tag\SinceTag
- *
- * @author Vasil Rangelov
- * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class SinceTagTest extends \PHPUnit_Framework_TestCase
-{
- /**
- * Test that the \phpDocumentor\Reflection\DocBlock\Tag\LinkTag can create
- * a link for the @since doc block.
- *
- * @param string $type
- * @param string $content
- * @param string $exContent
- * @param string $exDescription
- * @param string $exVersion
- *
- * @covers \phpDocumentor\Reflection\DocBlock\Tag\SinceTag
- * @dataProvider provideDataForConstuctor
- *
- * @return void
- */
- public function testConstructorParesInputsIntoCorrectFields(
- $type,
- $content,
- $exContent,
- $exDescription,
- $exVersion
- ) {
- $tag = new SinceTag($type, $content);
-
- $this->assertEquals($type, $tag->getName());
- $this->assertEquals($exContent, $tag->getContent());
- $this->assertEquals($exDescription, $tag->getDescription());
- $this->assertEquals($exVersion, $tag->getVersion());
- }
-
- /**
- * Data provider for testConstructorParesInputsIntoCorrectFields
- *
- * @return array
- */
- public function provideDataForConstuctor()
- {
- // $type, $content, $exContent, $exDescription, $exVersion
- return array(
- array(
- 'since',
- '1.0 First release.',
- '1.0 First release.',
- 'First release.',
- '1.0'
- ),
- array(
- 'since',
- "1.0\nFirst release.",
- "1.0\nFirst release.",
- 'First release.',
- '1.0'
- ),
- array(
- 'since',
- "1.0\nFirst\nrelease.",
- "1.0\nFirst\nrelease.",
- "First\nrelease.",
- '1.0'
- ),
- array(
- 'since',
- 'Unfinished release',
- 'Unfinished release',
- 'Unfinished release',
- ''
- ),
- array(
- 'since',
- '1.0',
- '1.0',
- '',
- '1.0'
- ),
- array(
- 'since',
- 'GIT: $Id$',
- 'GIT: $Id$',
- '',
- 'GIT: $Id$'
- ),
- array(
- 'since',
- 'GIT: $Id$ Dev build',
- 'GIT: $Id$ Dev build',
- 'Dev build',
- 'GIT: $Id$'
- )
- );
- }
-}
diff --git a/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/SourceTagTest.php b/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/SourceTagTest.php
deleted file mode 100644
index 2a40e0aa3bf..00000000000
--- a/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/SourceTagTest.php
+++ /dev/null
@@ -1,116 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tag;
-
-/**
- * Test class for \phpDocumentor\Reflection\DocBlock\Tag\SourceTag
- *
- * @author Vasil Rangelov
- * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class SourceTagTest extends \PHPUnit_Framework_TestCase
-{
- /**
- * Test that the \phpDocumentor\Reflection\DocBlock\Tag\SourceTag can
- * understand the @source DocBlock.
- *
- * @param string $type
- * @param string $content
- * @param string $exContent
- * @param string $exStartingLine
- * @param string $exLineCount
- *
- * @covers \phpDocumentor\Reflection\DocBlock\Tag\SourceTag
- * @dataProvider provideDataForConstuctor
- *
- * @return void
- */
- public function testConstructorParesInputsIntoCorrectFields(
- $type,
- $content,
- $exContent,
- $exDescription,
- $exStartingLine,
- $exLineCount
- ) {
- $tag = new SourceTag($type, $content);
-
- $this->assertEquals($type, $tag->getName());
- $this->assertEquals($exContent, $tag->getContent());
- $this->assertEquals($exDescription, $tag->getDescription());
- $this->assertEquals($exStartingLine, $tag->getStartingLine());
- $this->assertEquals($exLineCount, $tag->getLineCount());
- }
-
- /**
- * Data provider for testConstructorParesInputsIntoCorrectFields
- *
- * @return array
- */
- public function provideDataForConstuctor()
- {
- // $type, $content, $exContent, $exDescription, $exStartingLine, $exLineCount
- return array(
- array(
- 'source',
- '2',
- '2',
- '',
- 2,
- null
- ),
- array(
- 'source',
- 'Testing',
- 'Testing',
- 'Testing',
- 1,
- null
- ),
- array(
- 'source',
- '2 Testing',
- '2 Testing',
- 'Testing',
- 2,
- null
- ),
- array(
- 'source',
- '2 3 Testing comments',
- '2 3 Testing comments',
- 'Testing comments',
- 2,
- 3
- ),
- array(
- 'source',
- '2 -1 Testing comments',
- '2 -1 Testing comments',
- '-1 Testing comments',
- 2,
- null
- ),
- array(
- 'source',
- '-1 1 Testing comments',
- '-1 1 Testing comments',
- '-1 1 Testing comments',
- 1,
- null
- )
- );
- }
-}
diff --git a/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/ThrowsTagTest.php b/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/ThrowsTagTest.php
deleted file mode 100644
index 3c669d5583c..00000000000
--- a/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/ThrowsTagTest.php
+++ /dev/null
@@ -1,102 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tag;
-
-/**
- * Test class for \phpDocumentor\Reflection\DocBlock\ThrowsTag
- *
- * @author Mike van Riel
- * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class ThrowsTagTest extends \PHPUnit_Framework_TestCase
-{
- /**
- * Test that the \phpDocumentor\Reflection\DocBlock\Tag\ThrowsTag can
- * understand the @throws DocBlock.
- *
- * @param string $type
- * @param string $content
- * @param string $extractedType
- * @param string $extractedTypes
- * @param string $extractedDescription
- *
- * @covers \phpDocumentor\Reflection\DocBlock\Tag\ThrowsTag
- * @dataProvider provideDataForConstructor
- *
- * @return void
- */
- public function testConstructorParsesInputsIntoCorrectFields(
- $type,
- $content,
- $extractedType,
- $extractedTypes,
- $extractedDescription
- ) {
- $tag = new ThrowsTag($type, $content);
-
- $this->assertEquals($type, $tag->getName());
- $this->assertEquals($extractedType, $tag->getType());
- $this->assertEquals($extractedTypes, $tag->getTypes());
- $this->assertEquals($extractedDescription, $tag->getDescription());
- }
-
- /**
- * Data provider for testConstructorParsesInputsIntoCorrectFields()
- *
- * @return array
- */
- public function provideDataForConstructor()
- {
- return array(
- array('throws', '', '', array(), ''),
- array('throws', 'int', 'int', array('int'), ''),
- array(
- 'throws',
- 'int Number of Bobs',
- 'int',
- array('int'),
- 'Number of Bobs'
- ),
- array(
- 'throws',
- 'int|double Number of Bobs',
- 'int|double',
- array('int', 'double'),
- 'Number of Bobs'
- ),
- array(
- 'throws',
- "int Number of \n Bobs",
- 'int',
- array('int'),
- "Number of \n Bobs"
- ),
- array(
- 'throws',
- " int Number of Bobs",
- 'int',
- array('int'),
- "Number of Bobs"
- ),
- array(
- 'throws',
- "int\nNumber of Bobs",
- 'int',
- array('int'),
- "Number of Bobs"
- )
- );
- }
-}
diff --git a/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/UsesTagTest.php b/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/UsesTagTest.php
deleted file mode 100644
index 45868d73e93..00000000000
--- a/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/UsesTagTest.php
+++ /dev/null
@@ -1,86 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tag;
-
-/**
- * Test class for \phpDocumentor\Reflection\DocBlock\Tag\UsesTag
- *
- * @author Daniel O'Connor
- * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class UsesTagTest extends \PHPUnit_Framework_TestCase
-{
- /**
- * Test that the \phpDocumentor\Reflection\DocBlock\Tag\UsesTag can create
- * a link for the @uses doc block.
- *
- * @param string $type
- * @param string $content
- * @param string $exContent
- * @param string $exReference
- *
- * @covers \phpDocumentor\Reflection\DocBlock\Tag\UsesTag
- * @dataProvider provideDataForConstuctor
- *
- * @return void
- */
- public function testConstructorParesInputsIntoCorrectFields(
- $type,
- $content,
- $exContent,
- $exDescription,
- $exReference
- ) {
- $tag = new UsesTag($type, $content);
-
- $this->assertEquals($type, $tag->getName());
- $this->assertEquals($exContent, $tag->getContent());
- $this->assertEquals($exDescription, $tag->getDescription());
- $this->assertEquals($exReference, $tag->getReference());
- }
-
- /**
- * Data provider for testConstructorParesInputsIntoCorrectFields
- *
- * @return array
- */
- public function provideDataForConstuctor()
- {
- // $type, $content, $exContent, $exDescription, $exReference
- return array(
- array(
- 'uses',
- 'Foo::bar()',
- 'Foo::bar()',
- '',
- 'Foo::bar()'
- ),
- array(
- 'uses',
- 'Foo::bar() Testing',
- 'Foo::bar() Testing',
- 'Testing',
- 'Foo::bar()',
- ),
- array(
- 'uses',
- 'Foo::bar() Testing comments',
- 'Foo::bar() Testing comments',
- 'Testing comments',
- 'Foo::bar()',
- ),
- );
- }
-}
diff --git a/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/VarTagTest.php b/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/VarTagTest.php
deleted file mode 100644
index 9ae2aa5f7fa..00000000000
--- a/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/VarTagTest.php
+++ /dev/null
@@ -1,94 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tag;
-
-/**
- * Test class for \phpDocumentor\Reflection\DocBlock\Tag\VarTag
- *
- * @author Daniel O'Connor
- * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class VarTagTest extends \PHPUnit_Framework_TestCase
-{
- /**
- * Test that the \phpDocumentor\Reflection\DocBlock\Tag\VarTag can
- * understand the @var doc block.
- *
- * @param string $type
- * @param string $content
- * @param string $exType
- * @param string $exVariable
- * @param string $exDescription
- *
- * @covers \phpDocumentor\Reflection\DocBlock\Tag\VarTag
- * @dataProvider provideDataForConstuctor
- *
- * @return void
- */
- public function testConstructorParesInputsIntoCorrectFields(
- $type,
- $content,
- $exType,
- $exVariable,
- $exDescription
- ) {
- $tag = new VarTag($type, $content);
-
- $this->assertEquals($type, $tag->getName());
- $this->assertEquals($exType, $tag->getType());
- $this->assertEquals($exVariable, $tag->getVariableName());
- $this->assertEquals($exDescription, $tag->getDescription());
- }
-
- /**
- * Data provider for testConstructorParesInputsIntoCorrectFields
- *
- * @return array
- */
- public function provideDataForConstuctor()
- {
- // $type, $content, $exType, $exVariable, $exDescription
- return array(
- array(
- 'var',
- 'int',
- 'int',
- '',
- ''
- ),
- array(
- 'var',
- 'int $bob',
- 'int',
- '$bob',
- ''
- ),
- array(
- 'var',
- 'int $bob Number of bobs',
- 'int',
- '$bob',
- 'Number of bobs'
- ),
- array(
- 'var',
- '',
- '',
- '',
- ''
- ),
- );
- }
-}
diff --git a/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/VersionTagTest.php b/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/VersionTagTest.php
deleted file mode 100644
index e145386d457..00000000000
--- a/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/VersionTagTest.php
+++ /dev/null
@@ -1,115 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tag;
-
-/**
- * Test class for \phpDocumentor\Reflection\DocBlock\Tag\VersionTag
- *
- * @author Vasil Rangelov
- * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class VersionTagTest extends \PHPUnit_Framework_TestCase
-{
- /**
- * Test that the \phpDocumentor\Reflection\DocBlock\Tag\LinkTag can create
- * a link for the @version doc block.
- *
- * @param string $type
- * @param string $content
- * @param string $exContent
- * @param string $exDescription
- * @param string $exVersion
- *
- * @covers \phpDocumentor\Reflection\DocBlock\Tag\VersionTag
- * @dataProvider provideDataForConstuctor
- *
- * @return void
- */
- public function testConstructorParesInputsIntoCorrectFields(
- $type,
- $content,
- $exContent,
- $exDescription,
- $exVersion
- ) {
- $tag = new VersionTag($type, $content);
-
- $this->assertEquals($type, $tag->getName());
- $this->assertEquals($exContent, $tag->getContent());
- $this->assertEquals($exDescription, $tag->getDescription());
- $this->assertEquals($exVersion, $tag->getVersion());
- }
-
- /**
- * Data provider for testConstructorParesInputsIntoCorrectFields
- *
- * @return array
- */
- public function provideDataForConstuctor()
- {
- // $type, $content, $exContent, $exDescription, $exVersion
- return array(
- array(
- 'version',
- '1.0 First release.',
- '1.0 First release.',
- 'First release.',
- '1.0'
- ),
- array(
- 'version',
- "1.0\nFirst release.",
- "1.0\nFirst release.",
- 'First release.',
- '1.0'
- ),
- array(
- 'version',
- "1.0\nFirst\nrelease.",
- "1.0\nFirst\nrelease.",
- "First\nrelease.",
- '1.0'
- ),
- array(
- 'version',
- 'Unfinished release',
- 'Unfinished release',
- 'Unfinished release',
- ''
- ),
- array(
- 'version',
- '1.0',
- '1.0',
- '',
- '1.0'
- ),
- array(
- 'version',
- 'GIT: $Id$',
- 'GIT: $Id$',
- '',
- 'GIT: $Id$'
- ),
- array(
- 'version',
- 'GIT: $Id$ Dev build',
- 'GIT: $Id$ Dev build',
- 'Dev build',
- 'GIT: $Id$'
- )
- );
- }
-}
diff --git a/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/TagTest.php b/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/TagTest.php
deleted file mode 100644
index 9e873ecb5d7..00000000000
--- a/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/TagTest.php
+++ /dev/null
@@ -1,313 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock;
-
-use phpDocumentor\Reflection\DocBlock;
-use phpDocumentor\Reflection\DocBlock\Context;
-
-/**
- * Test class for \phpDocumentor\Reflection\DocBlock\Tag\VarTag
- *
- * @author Daniel O'Connor
- * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class TagTest extends \PHPUnit_Framework_TestCase
-{
-
- /**
- * @expectedException \InvalidArgumentException
- *
- * @return void
- */
- public function testInvalidTagLine()
- {
- Tag::createInstance('Invalid tag line');
- }
-
- /**
- * @covers \phpDocumentor\Reflection\DocBlock\Tag::registerTagHandler
- *
- * @return void
- */
- public function testTagHandlerUnregistration()
- {
- $currentHandler = __NAMESPACE__ . '\Tag\VarTag';
- $tagPreUnreg = Tag::createInstance('@var mixed');
- $this->assertInstanceOf(
- $currentHandler,
- $tagPreUnreg
- );
- $this->assertInstanceOf(
- __NAMESPACE__ . '\Tag',
- $tagPreUnreg
- );
-
- Tag::registerTagHandler('var', null);
-
- $tagPostUnreg = Tag::createInstance('@var mixed');
- $this->assertNotInstanceOf(
- $currentHandler,
- $tagPostUnreg
- );
- $this->assertInstanceOf(
- __NAMESPACE__ . '\Tag',
- $tagPostUnreg
- );
-
- Tag::registerTagHandler('var', $currentHandler);
- }
-
- /**
- * @covers \phpDocumentor\Reflection\DocBlock\Tag::registerTagHandler
- *
- * @return void
- */
- public function testTagHandlerCorrectRegistration()
- {
- if (0 == ini_get('allow_url_include')) {
- $this->markTestSkipped('"data" URIs for includes are required.');
- }
- $currentHandler = __NAMESPACE__ . '\Tag\VarTag';
- $tagPreReg = Tag::createInstance('@var mixed');
- $this->assertInstanceOf(
- $currentHandler,
- $tagPreReg
- );
- $this->assertInstanceOf(
- __NAMESPACE__ . '\Tag',
- $tagPreReg
- );
-
- include 'data:text/plain;base64,'. base64_encode(
-<<assertTrue(Tag::registerTagHandler('var', '\MyTagHandler'));
-
- $tagPostReg = Tag::createInstance('@var mixed');
- $this->assertNotInstanceOf(
- $currentHandler,
- $tagPostReg
- );
- $this->assertInstanceOf(
- __NAMESPACE__ . '\Tag',
- $tagPostReg
- );
- $this->assertInstanceOf(
- '\MyTagHandler',
- $tagPostReg
- );
-
- $this->assertTrue(Tag::registerTagHandler('var', $currentHandler));
- }
-
- /**
- * @depends testTagHandlerCorrectRegistration
- * @covers \phpDocumentor\Reflection\DocBlock\Tag::registerTagHandler
- * @covers \phpDocumentor\Reflection\DocBlock\Tag::createInstance
- *
- * @return void
- */
- public function testNamespacedTagHandlerCorrectRegistration()
- {
- $tagPreReg = Tag::createInstance('@T something');
- $this->assertInstanceOf(
- __NAMESPACE__ . '\Tag',
- $tagPreReg
- );
- $this->assertNotInstanceOf(
- '\MyTagHandler',
- $tagPreReg
- );
-
- $this->assertTrue(
- Tag::registerTagHandler('\MyNamespace\MyTag', '\MyTagHandler')
- );
-
- $tagPostReg = Tag::createInstance(
- '@T something',
- new DocBlock(
- '',
- new Context('', array('T' => '\MyNamespace\MyTag'))
- )
- );
- $this->assertInstanceOf(
- __NAMESPACE__ . '\Tag',
- $tagPostReg
- );
- $this->assertInstanceOf(
- '\MyTagHandler',
- $tagPostReg
- );
-
- $this->assertTrue(
- Tag::registerTagHandler('\MyNamespace\MyTag', null)
- );
- }
-
- /**
- * @depends testTagHandlerCorrectRegistration
- * @covers \phpDocumentor\Reflection\DocBlock\Tag::registerTagHandler
- * @covers \phpDocumentor\Reflection\DocBlock\Tag::createInstance
- *
- * @return void
- */
- public function testNamespacedTagHandlerIncorrectRegistration()
- {
- $tagPreReg = Tag::createInstance('@T something');
- $this->assertInstanceOf(
- __NAMESPACE__ . '\Tag',
- $tagPreReg
- );
- $this->assertNotInstanceOf(
- '\MyTagHandler',
- $tagPreReg
- );
-
- $this->assertFalse(
- Tag::registerTagHandler('MyNamespace\MyTag', '\MyTagHandler')
- );
-
- $tagPostReg = Tag::createInstance(
- '@T something',
- new DocBlock(
- '',
- new Context('', array('T' => '\MyNamespace\MyTag'))
- )
- );
- $this->assertInstanceOf(
- __NAMESPACE__ . '\Tag',
- $tagPostReg
- );
- $this->assertNotInstanceOf(
- '\MyTagHandler',
- $tagPostReg
- );
- }
-
- /**
- * @covers \phpDocumentor\Reflection\DocBlock\Tag::registerTagHandler
- *
- * @return void
- */
- public function testNonExistentTagHandlerRegistration()
- {
- $currentHandler = __NAMESPACE__ . '\Tag\VarTag';
- $tagPreReg = Tag::createInstance('@var mixed');
- $this->assertInstanceOf(
- $currentHandler,
- $tagPreReg
- );
- $this->assertInstanceOf(
- __NAMESPACE__ . '\Tag',
- $tagPreReg
- );
-
- $this->assertFalse(Tag::registerTagHandler('var', 'Non existent'));
-
- $tagPostReg = Tag::createInstance('@var mixed');
- $this->assertInstanceOf(
- $currentHandler,
- $tagPostReg
- );
- $this->assertInstanceOf(
- __NAMESPACE__ . '\Tag',
- $tagPostReg
- );
- }
-
- /**
- * @covers \phpDocumentor\Reflection\DocBlock\Tag::registerTagHandler
- *
- * @return void
- */
- public function testIncompatibleTagHandlerRegistration()
- {
- $currentHandler = __NAMESPACE__ . '\Tag\VarTag';
- $tagPreReg = Tag::createInstance('@var mixed');
- $this->assertInstanceOf(
- $currentHandler,
- $tagPreReg
- );
- $this->assertInstanceOf(
- __NAMESPACE__ . '\Tag',
- $tagPreReg
- );
-
- $this->assertFalse(
- Tag::registerTagHandler('var', __NAMESPACE__ . '\TagTest')
- );
-
- $tagPostReg = Tag::createInstance('@var mixed');
- $this->assertInstanceOf(
- $currentHandler,
- $tagPostReg
- );
- $this->assertInstanceOf(
- __NAMESPACE__ . '\Tag',
- $tagPostReg
- );
- }
-
- /**
- * Test that the \phpDocumentor\Reflection\DocBlock\Tag\VarTag can
- * understand the @var doc block.
- *
- * @param string $type
- * @param string $content
- * @param string $exDescription
- *
- * @covers \phpDocumentor\Reflection\DocBlock\Tag
- * @dataProvider provideDataForConstuctor
- *
- * @return void
- */
- public function testConstructorParesInputsIntoCorrectFields(
- $type,
- $content,
- $exDescription
- ) {
- $tag = new Tag($type, $content);
-
- $this->assertEquals($type, $tag->getName());
- $this->assertEquals($content, $tag->getContent());
- $this->assertEquals($exDescription, $tag->getDescription());
- }
-
- /**
- * Data provider for testConstructorParesInputsIntoCorrectFields
- *
- * @return array
- */
- public function provideDataForConstuctor()
- {
- // $type, $content, $exDescription
- return array(
- array(
- 'unknown',
- 'some content',
- 'some content',
- ),
- array(
- 'unknown',
- '',
- '',
- )
- );
- }
-}
diff --git a/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Type/CollectionTest.php b/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Type/CollectionTest.php
deleted file mode 100644
index 383a6c01fb7..00000000000
--- a/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Type/CollectionTest.php
+++ /dev/null
@@ -1,253 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Type;
-
-use phpDocumentor\Reflection\DocBlock\Context;
-
-/**
- * Test class for \phpDocumentor\Reflection\DocBlock\Type\Collection
- *
- * @covers phpDocumentor\Reflection\DocBlock\Type\Collection
- *
- * @author Mike van Riel
- * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class CollectionTest extends \PHPUnit_Framework_TestCase
-{
- /**
- * @covers phpDocumentor\Reflection\DocBlock\Type\Collection::__construct
- * @covers phpDocumentor\Reflection\DocBlock\Type\Collection::getContext
- *
- * @return void
- */
- public function testConstruct()
- {
- $collection = new Collection();
- $this->assertCount(0, $collection);
- $this->assertEquals('', $collection->getContext()->getNamespace());
- $this->assertCount(0, $collection->getContext()->getNamespaceAliases());
- }
-
- /**
- * @covers phpDocumentor\Reflection\DocBlock\Type\Collection::__construct
- *
- * @return void
- */
- public function testConstructWithTypes()
- {
- $collection = new Collection(array('integer', 'string'));
- $this->assertCount(2, $collection);
- }
-
- /**
- * @covers phpDocumentor\Reflection\DocBlock\Type\Collection::__construct
- *
- * @return void
- */
- public function testConstructWithNamespace()
- {
- $collection = new Collection(array(), new Context('\My\Space'));
- $this->assertEquals('My\Space', $collection->getContext()->getNamespace());
-
- $collection = new Collection(array(), new Context('My\Space'));
- $this->assertEquals('My\Space', $collection->getContext()->getNamespace());
-
- $collection = new Collection(array(), null);
- $this->assertEquals('', $collection->getContext()->getNamespace());
- }
-
- /**
- * @covers phpDocumentor\Reflection\DocBlock\Type\Collection::__construct
- *
- * @return void
- */
- public function testConstructWithNamespaceAliases()
- {
- $fixture = array('a' => 'b');
- $collection = new Collection(array(), new Context(null, $fixture));
- $this->assertEquals(
- array('a' => '\b'),
- $collection->getContext()->getNamespaceAliases()
- );
- }
-
- /**
- * @param string $fixture
- * @param array $expected
- *
- * @dataProvider provideTypesToExpand
- * @covers phpDocumentor\Reflection\DocBlock\Type\Collection::add
- *
- * @return void
- */
- public function testAdd($fixture, $expected)
- {
- $collection = new Collection(
- array(),
- new Context('\My\Space', array('Alias' => '\My\Space\Aliasing'))
- );
- $collection->add($fixture);
-
- $this->assertSame($expected, $collection->getArrayCopy());
- }
-
- /**
- * @param string $fixture
- * @param array $expected
- *
- * @dataProvider provideTypesToExpandWithoutNamespace
- * @covers phpDocumentor\Reflection\DocBlock\Type\Collection::add
- *
- * @return void
- */
- public function testAddWithoutNamespace($fixture, $expected)
- {
- $collection = new Collection(
- array(),
- new Context(null, array('Alias' => '\My\Space\Aliasing'))
- );
- $collection->add($fixture);
-
- $this->assertSame($expected, $collection->getArrayCopy());
- }
-
- /**
- * @param string $fixture
- * @param array $expected
- *
- * @dataProvider provideTypesToExpandWithPropertyOrMethod
- * @covers phpDocumentor\Reflection\DocBlock\Type\Collection::add
- *
- * @return void
- */
- public function testAddMethodsAndProperties($fixture, $expected)
- {
- $collection = new Collection(
- array(),
- new Context(null, array('LinkDescriptor' => '\phpDocumentor\LinkDescriptor'))
- );
- $collection->add($fixture);
-
- $this->assertSame($expected, $collection->getArrayCopy());
- }
-
- /**
- * @covers phpDocumentor\Reflection\DocBlock\Type\Collection::add
- * @expectedException InvalidArgumentException
- *
- * @return void
- */
- public function testAddWithInvalidArgument()
- {
- $collection = new Collection();
- $collection->add(array());
- }
-
- /**
- * Returns the types and their expected values to test the retrieval of
- * types.
- *
- * @param string $method Name of the method consuming this data provider.
- * @param string $namespace Name of the namespace to user as basis.
- *
- * @return string[]
- */
- public function provideTypesToExpand($method, $namespace = '\My\Space\\')
- {
- return array(
- array('', array()),
- array(' ', array()),
- array('int', array('int')),
- array('int ', array('int')),
- array('string', array('string')),
- array('DocBlock', array($namespace.'DocBlock')),
- array('DocBlock[]', array($namespace.'DocBlock[]')),
- array(' DocBlock ', array($namespace.'DocBlock')),
- array('\My\Space\DocBlock', array('\My\Space\DocBlock')),
- array('Alias\DocBlock', array('\My\Space\Aliasing\DocBlock')),
- array(
- 'DocBlock|Tag',
- array($namespace .'DocBlock', $namespace .'Tag')
- ),
- array(
- 'DocBlock|null',
- array($namespace.'DocBlock', 'null')
- ),
- array(
- '\My\Space\DocBlock|Tag',
- array('\My\Space\DocBlock', $namespace.'Tag')
- ),
- array(
- 'DocBlock[]|null',
- array($namespace.'DocBlock[]', 'null')
- ),
- array(
- 'DocBlock[]|int[]',
- array($namespace.'DocBlock[]', 'int[]')
- ),
- array(
- 'LinkDescriptor::setLink()',
- array($namespace.'LinkDescriptor::setLink()')
- ),
- array(
- 'Alias\LinkDescriptor::setLink()',
- array('\My\Space\Aliasing\LinkDescriptor::setLink()')
- ),
- );
- }
-
- /**
- * Returns the types and their expected values to test the retrieval of
- * types when no namespace is available.
- *
- * @param string $method Name of the method consuming this data provider.
- *
- * @return string[]
- */
- public function provideTypesToExpandWithoutNamespace($method)
- {
- return $this->provideTypesToExpand($method, '\\');
- }
-
- /**
- * Returns the method and property types and their expected values to test
- * the retrieval of types.
- *
- * @param string $method Name of the method consuming this data provider.
- *
- * @return string[]
- */
- public function provideTypesToExpandWithPropertyOrMethod($method)
- {
- return array(
- array(
- 'LinkDescriptor::setLink()',
- array('\phpDocumentor\LinkDescriptor::setLink()')
- ),
- array(
- 'phpDocumentor\LinkDescriptor::setLink()',
- array('\phpDocumentor\LinkDescriptor::setLink()')
- ),
- array(
- 'LinkDescriptor::$link',
- array('\phpDocumentor\LinkDescriptor::$link')
- ),
- array(
- 'phpDocumentor\LinkDescriptor::$link',
- array('\phpDocumentor\LinkDescriptor::$link')
- ),
- );
- }
-}
diff --git a/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlockTest.php b/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlockTest.php
deleted file mode 100644
index 30eedfc5819..00000000000
--- a/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlockTest.php
+++ /dev/null
@@ -1,337 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection;
-
-use phpDocumentor\Reflection\DocBlock\Context;
-use phpDocumentor\Reflection\DocBlock\Location;
-use phpDocumentor\Reflection\DocBlock\Tag\ReturnTag;
-
-/**
- * Test class for phpDocumentor\Reflection\DocBlock
- *
- * @author Mike van Riel
- * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-class DocBlockTest extends \PHPUnit_Framework_TestCase
-{
- /**
- * @covers \phpDocumentor\Reflection\DocBlock
- *
- * @return void
- */
- public function testConstruct()
- {
- $fixture = << '\phpDocumentor')),
- new Location(2)
- );
- $this->assertEquals(
- 'This is a short description',
- $object->getShortDescription()
- );
- $this->assertEquals(
- 'This is a long description',
- $object->getLongDescription()->getContents()
- );
- $this->assertCount(2, $object->getTags());
- $this->assertTrue($object->hasTag('see'));
- $this->assertTrue($object->hasTag('return'));
- $this->assertFalse($object->hasTag('category'));
-
- $this->assertSame('MyNamespace', $object->getContext()->getNamespace());
- $this->assertSame(
- array('PHPDoc' => '\phpDocumentor'),
- $object->getContext()->getNamespaceAliases()
- );
- $this->assertSame(2, $object->getLocation()->getLineNumber());
- }
-
- /**
- * @covers \phpDocumentor\Reflection\DocBlock::splitDocBlock
- *
- * @return void
- */
- public function testConstructWithTagsOnly()
- {
- $fixture = <<assertEquals('', $object->getShortDescription());
- $this->assertEquals('', $object->getLongDescription()->getContents());
- $this->assertCount(2, $object->getTags());
- $this->assertTrue($object->hasTag('see'));
- $this->assertTrue($object->hasTag('return'));
- $this->assertFalse($object->hasTag('category'));
- }
-
- /**
- * @covers \phpDocumentor\Reflection\DocBlock::isTemplateStart
- */
- public function testIfStartOfTemplateIsDiscovered()
- {
- $fixture = <<assertEquals('', $object->getShortDescription());
- $this->assertEquals('', $object->getLongDescription()->getContents());
- $this->assertCount(2, $object->getTags());
- $this->assertTrue($object->hasTag('see'));
- $this->assertTrue($object->hasTag('return'));
- $this->assertFalse($object->hasTag('category'));
- $this->assertTrue($object->isTemplateStart());
- }
-
- /**
- * @covers \phpDocumentor\Reflection\DocBlock::isTemplateEnd
- */
- public function testIfEndOfTemplateIsDiscovered()
- {
- $fixture = <<assertEquals('', $object->getShortDescription());
- $this->assertEquals('', $object->getLongDescription()->getContents());
- $this->assertTrue($object->isTemplateEnd());
- }
-
- /**
- * @covers \phpDocumentor\Reflection\DocBlock::cleanInput
- *
- * @return void
- */
- public function testConstructOneLiner()
- {
- $fixture = '/** Short description and nothing more. */';
- $object = new DocBlock($fixture);
- $this->assertEquals(
- 'Short description and nothing more.',
- $object->getShortDescription()
- );
- $this->assertEquals('', $object->getLongDescription()->getContents());
- $this->assertCount(0, $object->getTags());
- }
-
- /**
- * @covers \phpDocumentor\Reflection\DocBlock::__construct
- *
- * @return void
- */
- public function testConstructFromReflector()
- {
- $object = new DocBlock(new \ReflectionClass($this));
- $this->assertEquals(
- 'Test class for phpDocumentor\Reflection\DocBlock',
- $object->getShortDescription()
- );
- $this->assertEquals('', $object->getLongDescription()->getContents());
- $this->assertCount(4, $object->getTags());
- $this->assertTrue($object->hasTag('author'));
- $this->assertTrue($object->hasTag('copyright'));
- $this->assertTrue($object->hasTag('license'));
- $this->assertTrue($object->hasTag('link'));
- $this->assertFalse($object->hasTag('category'));
- }
-
- /**
- * @expectedException \InvalidArgumentException
- *
- * @return void
- */
- public function testExceptionOnInvalidObject()
- {
- new DocBlock($this);
- }
-
- public function testDotSeperation()
- {
- $fixture = <<assertEquals(
- 'This is a short description.',
- $object->getShortDescription()
- );
- $this->assertEquals(
- "This is a long description.\nThis is a continuation of the long "
- ."description.",
- $object->getLongDescription()->getContents()
- );
- }
-
- /**
- * @covers \phpDocumentor\Reflection\DocBlock::parseTags
- * @expectedException \LogicException
- *
- * @return void
- */
- public function testInvalidTagBlock()
- {
- if (0 == ini_get('allow_url_include')) {
- $this->markTestSkipped('"data" URIs for includes are required.');
- }
-
- include 'data:text/plain;base64,'. base64_encode(
- <<assertEquals(
- 'This is a short description.',
- $object->getShortDescription()
- );
- $this->assertEquals(
- 'This is a long description.',
- $object->getLongDescription()->getContents()
- );
- $tags = $object->getTags();
- $this->assertCount(2, $tags);
- $this->assertTrue($object->hasTag('method'));
- $this->assertTrue($object->hasTag('Method'));
- $this->assertInstanceOf(
- __NAMESPACE__ . '\DocBlock\Tag\MethodTag',
- $tags[0]
- );
- $this->assertInstanceOf(
- __NAMESPACE__ . '\DocBlock\Tag',
- $tags[1]
- );
- $this->assertNotInstanceOf(
- __NAMESPACE__ . '\DocBlock\Tag\MethodTag',
- $tags[1]
- );
- }
-
- /**
- * @depends testConstructFromReflector
- * @covers \phpDocumentor\Reflection\DocBlock::getTagsByName
- *
- * @return void
- */
- public function testGetTagsByNameZeroAndOneMatch()
- {
- $object = new DocBlock(new \ReflectionClass($this));
- $this->assertEmpty($object->getTagsByName('category'));
- $this->assertCount(1, $object->getTagsByName('author'));
- }
-
- /**
- * @depends testConstructWithTagsOnly
- * @covers \phpDocumentor\Reflection\DocBlock::parseTags
- *
- * @return void
- */
- public function testParseMultilineTag()
- {
- $fixture = <<assertCount(1, $object->getTags());
- }
-
- /**
- * @depends testConstructWithTagsOnly
- * @covers \phpDocumentor\Reflection\DocBlock::parseTags
- *
- * @return void
- */
- public function testParseMultilineTagWithLineBreaks()
- {
- $fixture = <<assertCount(1, $tags = $object->getTags());
- /** @var ReturnTag $tag */
- $tag = reset($tags);
- $this->assertEquals("Content on\n multiple lines.\n\n One more, after the break.", $tag->getDescription());
- }
-
- /**
- * @depends testConstructWithTagsOnly
- * @covers \phpDocumentor\Reflection\DocBlock::getTagsByName
- *
- * @return void
- */
- public function testGetTagsByNameMultipleMatch()
- {
- $fixture = <<assertEmpty($object->getTagsByName('category'));
- $this->assertCount(1, $object->getTagsByName('return'));
- $this->assertCount(2, $object->getTagsByName('param'));
- }
-}
diff --git a/vendor/phpspec/prophecy/CHANGES.md b/vendor/phpspec/prophecy/CHANGES.md
deleted file mode 100644
index fddfc412564..00000000000
--- a/vendor/phpspec/prophecy/CHANGES.md
+++ /dev/null
@@ -1,213 +0,0 @@
-1.8.0 / 2018/08/05
-==================
-
-* Support for void return types without explicit will (@crellbar)
-* Clearer error message for unexpected method calls (@meridius)
-* Clearer error message for aggregate exceptions (@meridius)
-* More verbose `shouldBeCalledOnce` expectation (@olvlvl)
-* Ability to double Throwable, or methods that extend it (@ciaranmcnulty)
-* [fixed] Doubling methods where class has additional arguments to interface (@webimpress)
-* [fixed] Doubling methods where arguments are nullable but default is not null (@webimpress)
-* [fixed] Doubling magic methods on parent class (@dsnopek)
-* [fixed] Check method predictions only once (@dontub)
-* [fixed] Argument::containingString throwing error when called with non-string (@dcabrejas)
-
-1.7.6 / 2018/04/18
-==================
-
-* Allow sebastian/comparator ^3.0 (@sebastianbergmann)
-
-1.7.5 / 2018/02/11
-==================
-
-* Support for object return type hints (thanks @greg0ire)
-
-1.7.4 / 2018/02/11
-==================
-
-* Fix issues with PHP 7.2 (thanks @greg0ire)
-* Support object type hints in PHP 7.2 (thanks @@jansvoboda11)
-
-1.7.3 / 2017/11/24
-==================
-
-* Fix SplInfo ClassPatch to work with Symfony 4 (Thanks @gnugat)
-
-1.7.2 / 2017-10-04
-==================
-
-* Reverted "check method predictions only once" due to it breaking Spies
-
-1.7.1 / 2017-10-03
-==================
-
-* Allow PHP5 keywords methods generation on PHP7 (thanks @bycosta)
-* Allow reflection-docblock v4 (thanks @GrahamCampbell)
-* Check method predictions only once (thanks @dontub)
-* Escape file path sent to \SplFileObjectConstructor when running on Windows (thanks @danmartin-epiphany)
-
-1.7.0 / 2017-03-02
-==================
-
-* Add full PHP 7.1 Support (thanks @prolic)
-* Allow `sebastian/comparator ^2.0` (thanks @sebastianbergmann)
-* Allow `sebastian/recursion-context ^3.0` (thanks @sebastianbergmann)
-* Allow `\Error` instances in `ThrowPromise` (thanks @jameshalsall)
-* Support `phpspec/phpspect ^3.2` (thanks @Sam-Burns)
-* Fix failing builds (thanks @Sam-Burns)
-
-1.6.2 / 2016-11-21
-==================
-
-* Added support for detecting @method on interfaces that the class itself implements, or when the stubbed class is an interface itself (thanks @Seldaek)
-* Added support for sebastian/recursion-context 2 (thanks @sebastianbergmann)
-* Added testing on PHP 7.1 on Travis (thanks @danizord)
-* Fixed the usage of the phpunit comparator (thanks @Anyqax)
-
-1.6.1 / 2016-06-07
-==================
-
- * Ignored empty method names in invalid `@method` phpdoc
- * Fixed the mocking of SplFileObject
- * Added compatibility with phpdocumentor/reflection-docblock 3
-
-1.6.0 / 2016-02-15
-==================
-
- * Add Variadics support (thanks @pamil)
- * Add ProphecyComparator for comparing objects that need revealing (thanks @jon-acker)
- * Add ApproximateValueToken (thanks @dantleech)
- * Add support for 'self' and 'parent' return type (thanks @bendavies)
- * Add __invoke to allowed reflectable methods list (thanks @ftrrtf)
- * Updated ExportUtil to reflect the latest changes by Sebastian (thanks @jakari)
- * Specify the required php version for composer (thanks @jakzal)
- * Exclude 'args' in the generated backtrace (thanks @oradwell)
- * Fix code generation for scalar parameters (thanks @trowski)
- * Fix missing sprintf in InvalidArgumentException __construct call (thanks @emmanuelballery)
- * Fix phpdoc for magic methods (thanks @Tobion)
- * Fix PhpDoc for interfaces usage (thanks @ImmRanneft)
- * Prevent final methods from being manually extended (thanks @kamioftea)
- * Enhance exception for invalid argument to ThrowPromise (thanks @Tobion)
-
-1.5.0 / 2015-04-27
-==================
-
- * Add support for PHP7 scalar type hints (thanks @trowski)
- * Add support for PHP7 return types (thanks @trowski)
- * Update internal test suite to support PHP7
-
-1.4.1 / 2015-04-27
-==================
-
- * Fixed bug in closure-based argument tokens (#181)
-
-1.4.0 / 2015-03-27
-==================
-
- * Fixed errors in return type phpdocs (thanks @sobit)
- * Fixed stringifying of hash containing one value (thanks @avant1)
- * Improved clarity of method call expectation exception (thanks @dantleech)
- * Add ability to specify which argument is returned in willReturnArgument (thanks @coderbyheart)
- * Add more information to MethodNotFound exceptions (thanks @ciaranmcnulty)
- * Support for mocking classes with methods that return references (thanks @edsonmedina)
- * Improved object comparison (thanks @whatthejeff)
- * Adopted '^' in composer dependencies (thanks @GrahamCampbell)
- * Fixed non-typehinted arguments being treated as optional (thanks @whatthejeff)
- * Magic methods are now filtered for keywords (thanks @seagoj)
- * More readable errors for failure when expecting single calls (thanks @dantleech)
-
-1.3.1 / 2014-11-17
-==================
-
- * Fix the edge case when failed predictions weren't recorded for `getCheckedPredictions()`
-
-1.3.0 / 2014-11-14
-==================
-
- * Add a way to get checked predictions with `MethodProphecy::getCheckedPredictions()`
- * Fix HHVM compatibility
- * Remove dead code (thanks @stof)
- * Add support for DirectoryIterators (thanks @shanethehat)
-
-1.2.0 / 2014-07-18
-==================
-
- * Added support for doubling magic methods documented in the class phpdoc (thanks @armetiz)
- * Fixed a segfault appearing in some cases (thanks @dmoreaulf)
- * Fixed the doubling of methods with typehints on non-existent classes (thanks @gquemener)
- * Added support for internal classes using keywords as method names (thanks @milan)
- * Added IdenticalValueToken and Argument::is (thanks @florianv)
- * Removed the usage of scalar typehints in HHVM as HHVM 3 does not support them anymore in PHP code (thanks @whatthejeff)
-
-1.1.2 / 2014-01-24
-==================
-
- * Spy automatically promotes spied method call to an expected one
-
-1.1.1 / 2014-01-15
-==================
-
- * Added support for HHVM
-
-1.1.0 / 2014-01-01
-==================
-
- * Changed the generated class names to use a static counter instead of a random number
- * Added a clss patch for ReflectionClass::newInstance to make its argument optional consistently (thanks @docteurklein)
- * Fixed mirroring of classes with typehints on non-existent classes (thanks @docteurklein)
- * Fixed the support of array callables in CallbackPromise and CallbackPrediction (thanks @ciaranmcnulty)
- * Added support for properties in ObjectStateToken (thanks @adrienbrault)
- * Added support for mocking classes with a final constructor (thanks @ciaranmcnulty)
- * Added ArrayEveryEntryToken and Argument::withEveryEntry() (thanks @adrienbrault)
- * Added an exception when trying to prophesize on a final method instead of ignoring silently (thanks @docteurklein)
- * Added StringContainToken and Argument::containingString() (thanks @peterjmit)
- * Added ``shouldNotHaveBeenCalled`` on the MethodProphecy (thanks @ciaranmcnulty)
- * Fixed the comparison of objects in ExactValuetoken (thanks @sstok)
- * Deprecated ``shouldNotBeenCalled`` in favor of ``shouldNotHaveBeenCalled``
-
-1.0.4 / 2013-08-10
-==================
-
- * Better randomness for generated class names (thanks @sstok)
- * Add support for interfaces into TypeToken and Argument::type() (thanks @sstok)
- * Add support for old-style (method name === class name) constructors (thanks @l310 for report)
-
-1.0.3 / 2013-07-04
-==================
-
- * Support callable typehints (thanks @stof)
- * Do not attempt to autoload arrays when generating code (thanks @MarcoDeBortoli)
- * New ArrayEntryToken (thanks @kagux)
-
-1.0.2 / 2013-05-19
-==================
-
- * Logical `AND` token added (thanks @kagux)
- * Logical `NOT` token added (thanks @kagux)
- * Add support for setting custom constructor arguments
- * Properly stringify hashes
- * Record calls that throw exceptions
- * Migrate spec suite to PhpSpec 2.0
-
-1.0.1 / 2013-04-30
-==================
-
- * Fix broken UnexpectedCallException message
- * Trim AggregateException message
-
-1.0.0 / 2013-04-29
-==================
-
- * Improve exception messages
-
-1.0.0-BETA2 / 2013-04-03
-========================
-
- * Add more debug information to CallTimes and Call prediction exception messages
- * Fix MethodNotFoundException wrong namespace (thanks @gunnarlium)
- * Fix some typos in the exception messages (thanks @pborreli)
-
-1.0.0-BETA1 / 2013-03-25
-========================
-
- * Initial release
diff --git a/vendor/phpspec/prophecy/LICENSE b/vendor/phpspec/prophecy/LICENSE
deleted file mode 100644
index c8b364711a5..00000000000
--- a/vendor/phpspec/prophecy/LICENSE
+++ /dev/null
@@ -1,23 +0,0 @@
-Copyright (c) 2013 Konstantin Kudryashov
- Marcello Duarte
-
-Permission is hereby granted, free of charge, to any person
-obtaining a copy of this software and associated documentation
-files (the "Software"), to deal in the Software without
-restriction, including without limitation the rights to use,
-copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the
-Software is furnished to do so, subject to the following
-conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
diff --git a/vendor/phpspec/prophecy/README.md b/vendor/phpspec/prophecy/README.md
deleted file mode 100644
index b190d43e192..00000000000
--- a/vendor/phpspec/prophecy/README.md
+++ /dev/null
@@ -1,391 +0,0 @@
-# Prophecy
-
-[![Stable release](https://poser.pugx.org/phpspec/prophecy/version.svg)](https://packagist.org/packages/phpspec/prophecy)
-[![Build Status](https://travis-ci.org/phpspec/prophecy.svg?branch=master)](https://travis-ci.org/phpspec/prophecy)
-
-Prophecy is a highly opinionated yet very powerful and flexible PHP object mocking
-framework. Though initially it was created to fulfil phpspec2 needs, it is flexible
-enough to be used inside any testing framework out there with minimal effort.
-
-## A simple example
-
-```php
-prophet->prophesize('App\Security\Hasher');
- $user = new App\Entity\User($hasher->reveal());
-
- $hasher->generateHash($user, 'qwerty')->willReturn('hashed_pass');
-
- $user->setPassword('qwerty');
-
- $this->assertEquals('hashed_pass', $user->getPassword());
- }
-
- protected function setup()
- {
- $this->prophet = new \Prophecy\Prophet;
- }
-
- protected function tearDown()
- {
- $this->prophet->checkPredictions();
- }
-}
-```
-
-## Installation
-
-### Prerequisites
-
-Prophecy requires PHP 5.3.3 or greater.
-
-### Setup through composer
-
-First, add Prophecy to the list of dependencies inside your `composer.json`:
-
-```json
-{
- "require-dev": {
- "phpspec/prophecy": "~1.0"
- }
-}
-```
-
-Then simply install it with composer:
-
-```bash
-$> composer install --prefer-dist
-```
-
-You can read more about Composer on its [official webpage](http://getcomposer.org).
-
-## How to use it
-
-First of all, in Prophecy every word has a logical meaning, even the name of the library
-itself (Prophecy). When you start feeling that, you'll become very fluid with this
-tool.
-
-For example, Prophecy has been named that way because it concentrates on describing the future
-behavior of objects with very limited knowledge about them. But as with any other prophecy,
-those object prophecies can't create themselves - there should be a Prophet:
-
-```php
-$prophet = new Prophecy\Prophet;
-```
-
-The Prophet creates prophecies by *prophesizing* them:
-
-```php
-$prophecy = $prophet->prophesize();
-```
-
-The result of the `prophesize()` method call is a new object of class `ObjectProphecy`. Yes,
-that's your specific object prophecy, which describes how your object would behave
-in the near future. But first, you need to specify which object you're talking about,
-right?
-
-```php
-$prophecy->willExtend('stdClass');
-$prophecy->willImplement('SessionHandlerInterface');
-```
-
-There are 2 interesting calls - `willExtend` and `willImplement`. The first one tells
-object prophecy that our object should extend specific class, the second one says that
-it should implement some interface. Obviously, objects in PHP can implement multiple
-interfaces, but extend only one parent class.
-
-### Dummies
-
-Ok, now we have our object prophecy. What can we do with it? First of all, we can get
-our object *dummy* by revealing its prophecy:
-
-```php
-$dummy = $prophecy->reveal();
-```
-
-The `$dummy` variable now holds a special dummy object. Dummy objects are objects that extend
-and/or implement preset classes/interfaces by overriding all their public methods. The key
-point about dummies is that they do not hold any logic - they just do nothing. Any method
-of the dummy will always return `null` and the dummy will never throw any exceptions.
-Dummy is your friend if you don't care about the actual behavior of this double and just need
-a token object to satisfy a method typehint.
-
-You need to understand one thing - a dummy is not a prophecy. Your object prophecy is still
-assigned to `$prophecy` variable and in order to manipulate with your expectations, you
-should work with it. `$dummy` is a dummy - a simple php object that tries to fulfil your
-prophecy.
-
-### Stubs
-
-Ok, now we know how to create basic prophecies and reveal dummies from them. That's
-awesome if we don't care about our _doubles_ (objects that reflect originals)
-interactions. If we do, we need to use *stubs* or *mocks*.
-
-A stub is an object double, which doesn't have any expectations about the object behavior,
-but when put in specific environment, behaves in specific way. Ok, I know, it's cryptic,
-but bear with me for a minute. Simply put, a stub is a dummy, which depending on the called
-method signature does different things (has logic). To create stubs in Prophecy:
-
-```php
-$prophecy->read('123')->willReturn('value');
-```
-
-Oh wow. We've just made an arbitrary call on the object prophecy? Yes, we did. And this
-call returned us a new object instance of class `MethodProphecy`. Yep, that's a specific
-method with arguments prophecy. Method prophecies give you the ability to create method
-promises or predictions. We'll talk about method predictions later in the _Mocks_ section.
-
-#### Promises
-
-Promises are logical blocks, that represent your fictional methods in prophecy terms
-and they are handled by the `MethodProphecy::will(PromiseInterface $promise)` method.
-As a matter of fact, the call that we made earlier (`willReturn('value')`) is a simple
-shortcut to:
-
-```php
-$prophecy->read('123')->will(new Prophecy\Promise\ReturnPromise(array('value')));
-```
-
-This promise will cause any call to our double's `read()` method with exactly one
-argument - `'123'` to always return `'value'`. But that's only for this
-promise, there's plenty others you can use:
-
-- `ReturnPromise` or `->willReturn(1)` - returns a value from a method call
-- `ReturnArgumentPromise` or `->willReturnArgument($index)` - returns the nth method argument from call
-- `ThrowPromise` or `->willThrow($exception)` - causes the method to throw specific exception
-- `CallbackPromise` or `->will($callback)` - gives you a quick way to define your own custom logic
-
-Keep in mind, that you can always add even more promises by implementing
-`Prophecy\Promise\PromiseInterface`.
-
-#### Method prophecies idempotency
-
-Prophecy enforces same method prophecies and, as a consequence, same promises and
-predictions for the same method calls with the same arguments. This means:
-
-```php
-$methodProphecy1 = $prophecy->read('123');
-$methodProphecy2 = $prophecy->read('123');
-$methodProphecy3 = $prophecy->read('321');
-
-$methodProphecy1 === $methodProphecy2;
-$methodProphecy1 !== $methodProphecy3;
-```
-
-That's interesting, right? Now you might ask me how would you define more complex
-behaviors where some method call changes behavior of others. In PHPUnit or Mockery
-you do that by predicting how many times your method will be called. In Prophecy,
-you'll use promises for that:
-
-```php
-$user->getName()->willReturn(null);
-
-// For PHP 5.4
-$user->setName('everzet')->will(function () {
- $this->getName()->willReturn('everzet');
-});
-
-// For PHP 5.3
-$user->setName('everzet')->will(function ($args, $user) {
- $user->getName()->willReturn('everzet');
-});
-
-// Or
-$user->setName('everzet')->will(function ($args) use ($user) {
- $user->getName()->willReturn('everzet');
-});
-```
-
-And now it doesn't matter how many times or in which order your methods are called.
-What matters is their behaviors and how well you faked it.
-
-#### Arguments wildcarding
-
-The previous example is awesome (at least I hope it is for you), but that's not
-optimal enough. We hardcoded `'everzet'` in our expectation. Isn't there a better
-way? In fact there is, but it involves understanding what this `'everzet'`
-actually is.
-
-You see, even if method arguments used during method prophecy creation look
-like simple method arguments, in reality they are not. They are argument token
-wildcards. As a matter of fact, `->setName('everzet')` looks like a simple call just
-because Prophecy automatically transforms it under the hood into:
-
-```php
-$user->setName(new Prophecy\Argument\Token\ExactValueToken('everzet'));
-```
-
-Those argument tokens are simple PHP classes, that implement
-`Prophecy\Argument\Token\TokenInterface` and tell Prophecy how to compare real arguments
-with your expectations. And yes, those classnames are damn big. That's why there's a
-shortcut class `Prophecy\Argument`, which you can use to create tokens like that:
-
-```php
-use Prophecy\Argument;
-
-$user->setName(Argument::exact('everzet'));
-```
-
-`ExactValueToken` is not very useful in our case as it forced us to hardcode the username.
-That's why Prophecy comes bundled with a bunch of other tokens:
-
-- `IdenticalValueToken` or `Argument::is($value)` - checks that the argument is identical to a specific value
-- `ExactValueToken` or `Argument::exact($value)` - checks that the argument matches a specific value
-- `TypeToken` or `Argument::type($typeOrClass)` - checks that the argument matches a specific type or
- classname
-- `ObjectStateToken` or `Argument::which($method, $value)` - checks that the argument method returns
- a specific value
-- `CallbackToken` or `Argument::that(callback)` - checks that the argument matches a custom callback
-- `AnyValueToken` or `Argument::any()` - matches any argument
-- `AnyValuesToken` or `Argument::cetera()` - matches any arguments to the rest of the signature
-- `StringContainsToken` or `Argument::containingString($value)` - checks that the argument contains a specific string value
-
-And you can add even more by implementing `TokenInterface` with your own custom classes.
-
-So, let's refactor our initial `{set,get}Name()` logic with argument tokens:
-
-```php
-use Prophecy\Argument;
-
-$user->getName()->willReturn(null);
-
-// For PHP 5.4
-$user->setName(Argument::type('string'))->will(function ($args) {
- $this->getName()->willReturn($args[0]);
-});
-
-// For PHP 5.3
-$user->setName(Argument::type('string'))->will(function ($args, $user) {
- $user->getName()->willReturn($args[0]);
-});
-
-// Or
-$user->setName(Argument::type('string'))->will(function ($args) use ($user) {
- $user->getName()->willReturn($args[0]);
-});
-```
-
-That's it. Now our `{set,get}Name()` prophecy will work with any string argument provided to it.
-We've just described how our stub object should behave, even though the original object could have
-no behavior whatsoever.
-
-One last bit about arguments now. You might ask, what happens in case of:
-
-```php
-use Prophecy\Argument;
-
-$user->getName()->willReturn(null);
-
-// For PHP 5.4
-$user->setName(Argument::type('string'))->will(function ($args) {
- $this->getName()->willReturn($args[0]);
-});
-
-// For PHP 5.3
-$user->setName(Argument::type('string'))->will(function ($args, $user) {
- $user->getName()->willReturn($args[0]);
-});
-
-// Or
-$user->setName(Argument::type('string'))->will(function ($args) use ($user) {
- $user->getName()->willReturn($args[0]);
-});
-
-$user->setName(Argument::any())->will(function () {
-});
-```
-
-Nothing. Your stub will continue behaving the way it did before. That's because of how
-arguments wildcarding works. Every argument token type has a different score level, which
-wildcard then uses to calculate the final arguments match score and use the method prophecy
-promise that has the highest score. In this case, `Argument::type()` in case of success
-scores `5` and `Argument::any()` scores `3`. So the type token wins, as does the first
-`setName()` method prophecy and its promise. The simple rule of thumb - more precise token
-always wins.
-
-#### Getting stub objects
-
-Ok, now we know how to define our prophecy method promises, let's get our stub from
-it:
-
-```php
-$stub = $prophecy->reveal();
-```
-
-As you might see, the only difference between how we get dummies and stubs is that with
-stubs we describe every object conversation instead of just agreeing with `null` returns
-(object being *dummy*). As a matter of fact, after you define your first promise
-(method call), Prophecy will force you to define all the communications - it throws
-the `UnexpectedCallException` for any call you didn't describe with object prophecy before
-calling it on a stub.
-
-### Mocks
-
-Now we know how to define doubles without behavior (dummies) and doubles with behavior, but
-no expectations (stubs). What's left is doubles for which we have some expectations. These
-are called mocks and in Prophecy they look almost exactly the same as stubs, except that
-they define *predictions* instead of *promises* on method prophecies:
-
-```php
-$entityManager->flush()->shouldBeCalled();
-```
-
-#### Predictions
-
-The `shouldBeCalled()` method here assigns `CallPrediction` to our method prophecy.
-Predictions are a delayed behavior check for your prophecies. You see, during the entire lifetime
-of your doubles, Prophecy records every single call you're making against it inside your
-code. After that, Prophecy can use this collected information to check if it matches defined
-predictions. You can assign predictions to method prophecies using the
-`MethodProphecy::should(PredictionInterface $prediction)` method. As a matter of fact,
-the `shouldBeCalled()` method we used earlier is just a shortcut to:
-
-```php
-$entityManager->flush()->should(new Prophecy\Prediction\CallPrediction());
-```
-
-It checks if your method of interest (that matches both the method name and the arguments wildcard)
-was called 1 or more times. If the prediction failed then it throws an exception. When does this
-check happen? Whenever you call `checkPredictions()` on the main Prophet object:
-
-```php
-$prophet->checkPredictions();
-```
-
-In PHPUnit, you would want to put this call into the `tearDown()` method. If no predictions
-are defined, it would do nothing. So it won't harm to call it after every test.
-
-There are plenty more predictions you can play with:
-
-- `CallPrediction` or `shouldBeCalled()` - checks that the method has been called 1 or more times
-- `NoCallsPrediction` or `shouldNotBeCalled()` - checks that the method has not been called
-- `CallTimesPrediction` or `shouldBeCalledTimes($count)` - checks that the method has been called
- `$count` times
-- `CallbackPrediction` or `should($callback)` - checks the method against your own custom callback
-
-Of course, you can always create your own custom prediction any time by implementing
-`PredictionInterface`.
-
-### Spies
-
-The last bit of awesomeness in Prophecy is out-of-the-box spies support. As I said in the previous
-section, Prophecy records every call made during the double's entire lifetime. This means
-you don't need to record predictions in order to check them. You can also do it
-manually by using the `MethodProphecy::shouldHave(PredictionInterface $prediction)` method:
-
-```php
-$em = $prophet->prophesize('Doctrine\ORM\EntityManager');
-
-$controller->createUser($em->reveal());
-
-$em->flush()->shouldHaveBeenCalled();
-```
-
-Such manipulation with doubles is called spying. And with Prophecy it just works.
diff --git a/vendor/phpspec/prophecy/composer.json b/vendor/phpspec/prophecy/composer.json
deleted file mode 100644
index 816f147e645..00000000000
--- a/vendor/phpspec/prophecy/composer.json
+++ /dev/null
@@ -1,50 +0,0 @@
-{
- "name": "phpspec/prophecy",
- "description": "Highly opinionated mocking framework for PHP 5.3+",
- "keywords": ["Mock", "Stub", "Dummy", "Double", "Fake", "Spy"],
- "homepage": "https://github.com/phpspec/prophecy",
- "type": "library",
- "license": "MIT",
- "authors": [
- {
- "name": "Konstantin Kudryashov",
- "email": "ever.zet@gmail.com",
- "homepage": "http://everzet.com"
- },
- {
- "name": "Marcello Duarte",
- "email": "marcello.duarte@gmail.com"
- }
- ],
-
- "require": {
- "php": "^5.3|^7.0",
- "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0",
- "sebastian/comparator": "^1.1|^2.0|^3.0",
- "doctrine/instantiator": "^1.0.2",
- "sebastian/recursion-context": "^1.0|^2.0|^3.0"
- },
-
- "require-dev": {
- "phpspec/phpspec": "^2.5|^3.2",
- "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1"
- },
-
- "autoload": {
- "psr-0": {
- "Prophecy\\": "src/"
- }
- },
-
- "autoload-dev": {
- "psr-4": {
- "Fixtures\\Prophecy\\": "fixtures"
- }
- },
-
- "extra": {
- "branch-alias": {
- "dev-master": "1.8.x-dev"
- }
- }
-}
diff --git a/vendor/phpspec/prophecy/src/Prophecy/Argument.php b/vendor/phpspec/prophecy/src/Prophecy/Argument.php
deleted file mode 100644
index fde6aa9000d..00000000000
--- a/vendor/phpspec/prophecy/src/Prophecy/Argument.php
+++ /dev/null
@@ -1,212 +0,0 @@
-
- * Marcello Duarte
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Prophecy;
-
-use Prophecy\Argument\Token;
-
-/**
- * Argument tokens shortcuts.
- *
- * @author Konstantin Kudryashov
- */
-class Argument
-{
- /**
- * Checks that argument is exact value or object.
- *
- * @param mixed $value
- *
- * @return Token\ExactValueToken
- */
- public static function exact($value)
- {
- return new Token\ExactValueToken($value);
- }
-
- /**
- * Checks that argument is of specific type or instance of specific class.
- *
- * @param string $type Type name (`integer`, `string`) or full class name
- *
- * @return Token\TypeToken
- */
- public static function type($type)
- {
- return new Token\TypeToken($type);
- }
-
- /**
- * Checks that argument object has specific state.
- *
- * @param string $methodName
- * @param mixed $value
- *
- * @return Token\ObjectStateToken
- */
- public static function which($methodName, $value)
- {
- return new Token\ObjectStateToken($methodName, $value);
- }
-
- /**
- * Checks that argument matches provided callback.
- *
- * @param callable $callback
- *
- * @return Token\CallbackToken
- */
- public static function that($callback)
- {
- return new Token\CallbackToken($callback);
- }
-
- /**
- * Matches any single value.
- *
- * @return Token\AnyValueToken
- */
- public static function any()
- {
- return new Token\AnyValueToken;
- }
-
- /**
- * Matches all values to the rest of the signature.
- *
- * @return Token\AnyValuesToken
- */
- public static function cetera()
- {
- return new Token\AnyValuesToken;
- }
-
- /**
- * Checks that argument matches all tokens
- *
- * @param mixed ... a list of tokens
- *
- * @return Token\LogicalAndToken
- */
- public static function allOf()
- {
- return new Token\LogicalAndToken(func_get_args());
- }
-
- /**
- * Checks that argument array or countable object has exact number of elements.
- *
- * @param integer $value array elements count
- *
- * @return Token\ArrayCountToken
- */
- public static function size($value)
- {
- return new Token\ArrayCountToken($value);
- }
-
- /**
- * Checks that argument array contains (key, value) pair
- *
- * @param mixed $key exact value or token
- * @param mixed $value exact value or token
- *
- * @return Token\ArrayEntryToken
- */
- public static function withEntry($key, $value)
- {
- return new Token\ArrayEntryToken($key, $value);
- }
-
- /**
- * Checks that arguments array entries all match value
- *
- * @param mixed $value
- *
- * @return Token\ArrayEveryEntryToken
- */
- public static function withEveryEntry($value)
- {
- return new Token\ArrayEveryEntryToken($value);
- }
-
- /**
- * Checks that argument array contains value
- *
- * @param mixed $value
- *
- * @return Token\ArrayEntryToken
- */
- public static function containing($value)
- {
- return new Token\ArrayEntryToken(self::any(), $value);
- }
-
- /**
- * Checks that argument array has key
- *
- * @param mixed $key exact value or token
- *
- * @return Token\ArrayEntryToken
- */
- public static function withKey($key)
- {
- return new Token\ArrayEntryToken($key, self::any());
- }
-
- /**
- * Checks that argument does not match the value|token.
- *
- * @param mixed $value either exact value or argument token
- *
- * @return Token\LogicalNotToken
- */
- public static function not($value)
- {
- return new Token\LogicalNotToken($value);
- }
-
- /**
- * @param string $value
- *
- * @return Token\StringContainsToken
- */
- public static function containingString($value)
- {
- return new Token\StringContainsToken($value);
- }
-
- /**
- * Checks that argument is identical value.
- *
- * @param mixed $value
- *
- * @return Token\IdenticalValueToken
- */
- public static function is($value)
- {
- return new Token\IdenticalValueToken($value);
- }
-
- /**
- * Check that argument is same value when rounding to the
- * given precision.
- *
- * @param float $value
- * @param float $precision
- *
- * @return Token\ApproximateValueToken
- */
- public static function approximate($value, $precision = 0)
- {
- return new Token\ApproximateValueToken($value, $precision);
- }
-}
diff --git a/vendor/phpspec/prophecy/src/Prophecy/Argument/ArgumentsWildcard.php b/vendor/phpspec/prophecy/src/Prophecy/Argument/ArgumentsWildcard.php
deleted file mode 100644
index a088f21d21d..00000000000
--- a/vendor/phpspec/prophecy/src/Prophecy/Argument/ArgumentsWildcard.php
+++ /dev/null
@@ -1,101 +0,0 @@
-
- * Marcello Duarte