When I run this code:
expect( 'func_1' )
->once()
->with( 'krya' )
->andReturn( 'krya' );
$this->assertSame( 'krya', func_1( 'ne-krya' ) );
Result: Failed asserting that null is identical to 'krya'.. It looks well.
But when I run this code:
expect( 'func_1' )
->with( 'krya' )
->once()
->andReturn( 'krya' );
$this->assertSame( 'krya', func_1( 'ne-krya' ) );
OK (1 test, 1 assertion)
Works but why?