Move into nested docroot
This commit is contained in:
parent
83a0d3a149
commit
c8b70abde9
13405 changed files with 0 additions and 0 deletions
85
web/vendor/phpunit/phpunit-mock-objects/tests/MockObject/Invocation/ObjectTest.php
vendored
Normal file
85
web/vendor/phpunit/phpunit-mock-objects/tests/MockObject/Invocation/ObjectTest.php
vendored
Normal file
|
@ -0,0 +1,85 @@
|
|||
<?php
|
||||
|
||||
class Framework_MockObject_Invocation_ObjectTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
public function testConstructorRequiresClassAndMethodAndParametersAndObject()
|
||||
{
|
||||
new PHPUnit_Framework_MockObject_Invocation_Object(
|
||||
'FooClass',
|
||||
'FooMethod',
|
||||
array('an_argument'),
|
||||
new StdClass
|
||||
);
|
||||
}
|
||||
|
||||
public function testAllowToGetClassNameSetInConstructor()
|
||||
{
|
||||
$invocation = new PHPUnit_Framework_MockObject_Invocation_Object(
|
||||
'FooClass',
|
||||
'FooMethod',
|
||||
array('an_argument'),
|
||||
new StdClass
|
||||
);
|
||||
|
||||
$this->assertSame('FooClass', $invocation->className);
|
||||
}
|
||||
|
||||
public function testAllowToGetMethodNameSetInConstructor()
|
||||
{
|
||||
$invocation = new PHPUnit_Framework_MockObject_Invocation_Object(
|
||||
'FooClass',
|
||||
'FooMethod',
|
||||
array('an_argument'),
|
||||
new StdClass
|
||||
);
|
||||
|
||||
$this->assertSame('FooMethod', $invocation->methodName);
|
||||
}
|
||||
|
||||
public function testAllowToGetObjectSetInConstructor()
|
||||
{
|
||||
$expectedObject = new StdClass;
|
||||
|
||||
$invocation = new PHPUnit_Framework_MockObject_Invocation_Object(
|
||||
'FooClass',
|
||||
'FooMethod',
|
||||
array('an_argument'),
|
||||
$expectedObject
|
||||
);
|
||||
|
||||
$this->assertSame($expectedObject, $invocation->object);
|
||||
}
|
||||
|
||||
public function testAllowToGetMethodParametersSetInConstructor()
|
||||
{
|
||||
$expectedParameters = array(
|
||||
'foo', 5, array('a', 'b'), new StdClass, null, false
|
||||
);
|
||||
|
||||
$invocation = new PHPUnit_Framework_MockObject_Invocation_Object(
|
||||
'FooClass',
|
||||
'FooMethod',
|
||||
$expectedParameters,
|
||||
new StdClass
|
||||
);
|
||||
|
||||
$this->assertSame($expectedParameters, $invocation->parameters);
|
||||
}
|
||||
|
||||
public function testConstructorAllowToSetFlagCloneObjectsInParameters()
|
||||
{
|
||||
$parameters = array(new StdClass);
|
||||
$cloneObjects = true;
|
||||
|
||||
$invocation = new PHPUnit_Framework_MockObject_Invocation_Object(
|
||||
'FooClass',
|
||||
'FooMethod',
|
||||
$parameters,
|
||||
new StdClass,
|
||||
$cloneObjects
|
||||
);
|
||||
|
||||
$this->assertEquals($parameters, $invocation->parameters);
|
||||
$this->assertNotSame($parameters, $invocation->parameters);
|
||||
}
|
||||
}
|
54
web/vendor/phpunit/phpunit-mock-objects/tests/MockObject/Invocation/StaticTest.php
vendored
Normal file
54
web/vendor/phpunit/phpunit-mock-objects/tests/MockObject/Invocation/StaticTest.php
vendored
Normal file
|
@ -0,0 +1,54 @@
|
|||
<?php
|
||||
|
||||
class Framework_MockObject_Invocation_StaticTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
public function testConstructorRequiresClassAndMethodAndParameters()
|
||||
{
|
||||
new PHPUnit_Framework_MockObject_Invocation_Static('FooClass', 'FooMethod', array('an_argument'));
|
||||
}
|
||||
|
||||
public function testAllowToGetClassNameSetInConstructor()
|
||||
{
|
||||
$invocation = new PHPUnit_Framework_MockObject_Invocation_Static('FooClass', 'FooMethod', array('an_argument'));
|
||||
|
||||
$this->assertSame('FooClass', $invocation->className);
|
||||
}
|
||||
|
||||
public function testAllowToGetMethodNameSetInConstructor()
|
||||
{
|
||||
$invocation = new PHPUnit_Framework_MockObject_Invocation_Static('FooClass', 'FooMethod', array('an_argument'));
|
||||
|
||||
$this->assertSame('FooMethod', $invocation->methodName);
|
||||
}
|
||||
|
||||
public function testAllowToGetMethodParametersSetInConstructor()
|
||||
{
|
||||
$expectedParameters = array(
|
||||
'foo', 5, array('a', 'b'), new StdClass, null, false
|
||||
);
|
||||
|
||||
$invocation = new PHPUnit_Framework_MockObject_Invocation_Static(
|
||||
'FooClass',
|
||||
'FooMethod',
|
||||
$expectedParameters
|
||||
);
|
||||
|
||||
$this->assertSame($expectedParameters, $invocation->parameters);
|
||||
}
|
||||
|
||||
public function testConstructorAllowToSetFlagCloneObjectsInParameters()
|
||||
{
|
||||
$parameters = array(new StdClass);
|
||||
$cloneObjects = true;
|
||||
|
||||
$invocation = new PHPUnit_Framework_MockObject_Invocation_Static(
|
||||
'FooClass',
|
||||
'FooMethod',
|
||||
$parameters,
|
||||
$cloneObjects
|
||||
);
|
||||
|
||||
$this->assertEquals($parameters, $invocation->parameters);
|
||||
$this->assertNotSame($parameters, $invocation->parameters);
|
||||
}
|
||||
}
|
Reference in a new issue