3
class Framework_MockObject_Invocation_StaticTest extends PHPUnit_Framework_TestCase
5
public function testConstructorRequiresClassAndMethodAndParameters()
7
new PHPUnit_Framework_MockObject_Invocation_Static('FooClass', 'FooMethod', array('an_argument'));
10
public function testAllowToGetClassNameSetInConstructor()
12
$invocation = new PHPUnit_Framework_MockObject_Invocation_Static('FooClass', 'FooMethod', array('an_argument'));
14
$this->assertSame('FooClass', $invocation->className);
17
public function testAllowToGetMethodNameSetInConstructor()
19
$invocation = new PHPUnit_Framework_MockObject_Invocation_Static('FooClass', 'FooMethod', array('an_argument'));
21
$this->assertSame('FooMethod', $invocation->methodName);
24
public function testAllowToGetMethodParametersSetInConstructor()
26
$expectedParameters = array(
27
'foo', 5, array('a', 'b'), new StdClass, NULL, FALSE
30
$invocation = new PHPUnit_Framework_MockObject_Invocation_Static(
31
'FooClass', 'FooMethod', $expectedParameters
34
$this->assertSame($expectedParameters, $invocation->parameters);
37
public function testConstructorAllowToSetFlagCloneObjectsInParameters()
39
$parameters = array(new StdClass);
42
$invocation = new PHPUnit_Framework_MockObject_Invocation_Static(
49
$this->assertEquals($parameters, $invocation->parameters);
50
$this->assertNotSame($parameters, $invocation->parameters);