This commit is contained in:
Torsten 2018-08-07 10:42:11 +02:00
parent 98419bd18d
commit 8a69e45efa
4919 changed files with 28311 additions and 224136 deletions

53
pfosten/vendor/phpunit/phpunit-mock-objects/tests/GeneratorTest.php vendored Executable file → Normal file
View file

@ -1,10 +1,23 @@
<?php
/**
* @covers PHPUnit_Framework_MockObject_Generator
*
* @uses PHPUnit_Framework_MockObject_InvocationMocker
* @uses PHPUnit_Framework_MockObject_Builder_InvocationMocker
* @uses PHPUnit_Framework_MockObject_Invocation_Object
* @uses PHPUnit_Framework_MockObject_Invocation_Static
* @uses PHPUnit_Framework_MockObject_Matcher
* @uses PHPUnit_Framework_MockObject_Matcher_InvokedRecorder
* @uses PHPUnit_Framework_MockObject_Matcher_MethodName
* @uses PHPUnit_Framework_MockObject_Stub_Return
* @uses PHPUnit_Framework_MockObject_Matcher_InvokedCount
*/
class Framework_MockObject_GeneratorTest extends PHPUnit_Framework_TestCase
{
/**
* @var PHPUnit_Framework_MockObject_Generator
*/
protected $generator;
private $generator;
protected function setUp()
{
@ -12,7 +25,6 @@ class Framework_MockObject_GeneratorTest extends PHPUnit_Framework_TestCase
}
/**
* @covers PHPUnit_Framework_MockObject_Generator::getMock
* @expectedException PHPUnit_Framework_MockObject_RuntimeException
*/
public function testGetMockFailsWhenInvalidFunctionNameIsPassedInAsAFunctionToMock()
@ -20,9 +32,6 @@ class Framework_MockObject_GeneratorTest extends PHPUnit_Framework_TestCase
$this->generator->getMock(stdClass::class, [0]);
}
/**
* @covers PHPUnit_Framework_MockObject_Generator::getMock
*/
public function testGetMockCanCreateNonExistingFunctions()
{
$mock = $this->generator->getMock(stdClass::class, ['testFunction']);
@ -31,7 +40,6 @@ class Framework_MockObject_GeneratorTest extends PHPUnit_Framework_TestCase
}
/**
* @covers PHPUnit_Framework_MockObject_Generator::getMock
* @expectedException PHPUnit_Framework_MockObject_RuntimeException
* @expectedExceptionMessage duplicates: "foo, bar, foo" (duplicate: "foo")
*/
@ -41,8 +49,6 @@ class Framework_MockObject_GeneratorTest extends PHPUnit_Framework_TestCase
}
/**
* @covers PHPUnit_Framework_MockObject_Generator::getMock
* @covers PHPUnit_Framework_MockObject_Generator::isMethodNameBlacklisted
* @requires PHP 7
*/
public function testGetMockBlacklistedMethodNamesPhp7()
@ -53,9 +59,6 @@ class Framework_MockObject_GeneratorTest extends PHPUnit_Framework_TestCase
$this->assertInstanceOf(InterfaceWithSemiReservedMethodName::class, $mock);
}
/**
* @covers PHPUnit_Framework_MockObject_Generator::getMockForAbstractClass
*/
public function testGetMockForAbstractClassDoesNotFailWhenFakingInterfaces()
{
$mock = $this->generator->getMockForAbstractClass(Countable::class);
@ -63,9 +66,6 @@ class Framework_MockObject_GeneratorTest extends PHPUnit_Framework_TestCase
$this->assertTrue(method_exists($mock, 'count'));
}
/**
* @covers PHPUnit_Framework_MockObject_Generator::getMockForAbstractClass
*/
public function testGetMockForAbstractClassStubbingAbstractClass()
{
$mock = $this->generator->getMockForAbstractClass(AbstractMockTestClass::class);
@ -73,9 +73,6 @@ class Framework_MockObject_GeneratorTest extends PHPUnit_Framework_TestCase
$this->assertTrue(method_exists($mock, 'doSomething'));
}
/**
* @covers PHPUnit_Framework_MockObject_Generator::getMockForAbstractClass
*/
public function testGetMockForAbstractClassWithNonExistentMethods()
{
$mock = $this->generator->getMockForAbstractClass(
@ -92,9 +89,6 @@ class Framework_MockObject_GeneratorTest extends PHPUnit_Framework_TestCase
$this->assertTrue(method_exists($mock, 'doSomething'));
}
/**
* @covers PHPUnit_Framework_MockObject_Generator::getMockForAbstractClass
*/
public function testGetMockForAbstractClassShouldCreateStubsOnlyForAbstractMethodWhenNoMethodsWereInformed()
{
$mock = $this->generator->getMockForAbstractClass(AbstractMockTestClass::class);
@ -109,7 +103,6 @@ class Framework_MockObject_GeneratorTest extends PHPUnit_Framework_TestCase
/**
* @dataProvider getMockForAbstractClassExpectsInvalidArgumentExceptionDataprovider
* @covers PHPUnit_Framework_MockObject_Generator::getMockForAbstractClass
* @expectedException PHPUnit_Framework_Exception
*/
public function testGetMockForAbstractClassExpectingInvalidArgumentException($className, $mockClassName)
@ -118,7 +111,6 @@ class Framework_MockObject_GeneratorTest extends PHPUnit_Framework_TestCase
}
/**
* @covers PHPUnit_Framework_MockObject_Generator::getMockForAbstractClass
* @expectedException PHPUnit_Framework_MockObject_RuntimeException
*/
public function testGetMockForAbstractClassAbstractClassDoesNotExist()
@ -134,9 +126,6 @@ class Framework_MockObject_GeneratorTest extends PHPUnit_Framework_TestCase
];
}
/**
* @covers PHPUnit_Framework_MockObject_Generator::getMockForTrait
*/
public function testGetMockForTraitWithNonExistentMethodsAndNonAbstractMethods()
{
$mock = $this->generator->getMockForTrait(
@ -155,9 +144,6 @@ class Framework_MockObject_GeneratorTest extends PHPUnit_Framework_TestCase
$this->assertTrue($mock->anotherMockableMethod());
}
/**
* @covers PHPUnit_Framework_MockObject_Generator::getMockForTrait
*/
public function testGetMockForTraitStubbingAbstractMethod()
{
$mock = $this->generator->getMockForTrait(AbstractTrait::class);
@ -173,7 +159,6 @@ class Framework_MockObject_GeneratorTest extends PHPUnit_Framework_TestCase
}
/**
* @covers PHPUnit_Framework_MockObject_Generator::getMock
* @expectedException PHPUnit_Framework_MockObject_RuntimeException
*/
public function testExceptionIsRaisedForMutuallyExclusiveOptions()
@ -182,8 +167,6 @@ class Framework_MockObject_GeneratorTest extends PHPUnit_Framework_TestCase
}
/**
* @covers PHPUnit_Framework_MockObject_Generator::getMock
*
* @requires PHP 7
*/
public function testCanImplementInterfacesThatHaveMethodsWithReturnTypes()
@ -195,11 +178,6 @@ class Framework_MockObject_GeneratorTest extends PHPUnit_Framework_TestCase
$this->assertInstanceOf(PHPUnit_Framework_MockObject_MockObject::class, $stub);
}
/**
* @covers PHPUnit_Framework_MockObject_Generator::getMock
*
* @ticket https://github.com/sebastianbergmann/phpunit-mock-objects/issues/322
*/
public function testCanConfigureMethodsForDoubleOfNonExistentClass()
{
$className = 'X' . md5(microtime());
@ -209,9 +187,6 @@ class Framework_MockObject_GeneratorTest extends PHPUnit_Framework_TestCase
$this->assertInstanceOf($className, $mock);
}
/**
* @covers PHPUnit_Framework_MockObject_Generator::getMock
*/
public function testCanInvokeMethodsOfNonExistentClass()
{
$className = 'X' . md5(microtime());

View file

View file

View file

View file

View file

@ -429,9 +429,6 @@ class Framework_MockObjectTest extends PHPUnit_Framework_TestCase
$this->assertNotEquals(get_class($mock4), get_class($mock5));
}
/**
* @covers PHPUnit_Framework_MockObject_Generator::getMock
*/
public function testGetMockWithFixedClassNameCanProduceTheSameMockTwice()
{
$mock = $this->getMockBuilder(stdClass::class)->setMockClassName('FixedName')->getMock();

View file

View file

View file

View file

View file

0
pfosten/vendor/phpunit/phpunit-mock-objects/tests/_fixture/Bar.php vendored Executable file → Normal file
View file

View file

View file

0
pfosten/vendor/phpunit/phpunit-mock-objects/tests/_fixture/Foo.php vendored Executable file → Normal file
View file

View file

View file

View file

View file

View file

View file

View file

View file

View file

View file

0
pfosten/vendor/phpunit/phpunit-mock-objects/tests/bootstrap.php vendored Executable file → Normal file
View file