コード例 #1
0
 public function testUnderAtLeastOnce()
 {
     $this->test->expectOnce('assert', array(new MemberExpectation('count', 1), 0));
     $mock = new MockDummyWithInjectedTestCase();
     $mock->expectAtLeastOnce("aMethod");
     $mock->mock->atTestEnd('testSomething', $this->test);
 }
コード例 #2
0
 function testUnderAtLeastOnce()
 {
     $this->test->expectOnce('assert', array(new LikeExpectation(new MinimumCallCountExpectation('aMethod', 1)), 0));
     $mock = new MockDummyWithInjectedTestCase();
     $mock->expectAtLeastOnce("aMethod");
     $mock->mock->atTestEnd('testSomething', $this->test);
 }
コード例 #3
0
ファイル: mock_objects_test.php プロジェクト: Zunair/xataface
 function testUnderAtLeastOnce()
 {
     $this->test->expectOnce("assertTrue", array(false, '*'));
     $mock = new MockDummyWithInjectedTestCase();
     $mock->expectAtLeastOnce("aMethod");
     $mock->atTestEnd('testSomething');
 }