public function testStubWithMockFailsExpectation() { $this->stubWithMock('A', function ($test, $mock, $args) { $mock->expects($test->once())->method('B')->with($test->equalTo('FAILURE'))->will($test->returnValue(7)); }, array(), false); $x = new A(); $this->assertEquals(7, $x->B('abc')); }
<?php \A::B(); \A\C::B(); \A\C\D::B();
<?php //array('Variable', 'Property', 'Staticproperty', 'Staticconstant', 'Methodcall', 'Staticmethodcall', 'Functioncall', 'Identifier', 'Nsname') foo(...$a); foo(...$a->b); foo(...$a->b()); foo(...a::b); foo(...a::$b); foo(...a::b()); foo(...a()); foo(...a); foo(...\a); FOO($A); FOO($A->B); FOO($A->B()); FOO(A::B); FOO(A::$B); FOO(A::B()); FOO(A()); FOO(A); FOO(\A);