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'));
 }
Beispiel #2
0
<?php

\A::B();
\A\C::B();
\A\C\D::B();
Beispiel #3
0
<?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);