本文整理汇总了PHP中LimeTest::skip方法的典型用法代码示例。如果您正苦于以下问题:PHP LimeTest::skip方法的具体用法?PHP LimeTest::skip怎么用?PHP LimeTest::skip使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LimeTest
的用法示例。
在下文中一共展示了LimeTest::skip方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
// test
$m = LimeMock::create('TestInterface');
// assertions
$t->ok($m instanceof TestInterface, 'The mock implements the interface');
$t->ok($m instanceof LimeMockInterface, 'The mock implements "LimeMockInterface"');
// @Test: Namespaced interfaces can be mocked (PHP 5.3)
if (version_compare(PHP_VERSION, '5.3', '>=')) {
require_once __DIR__ . '/php5.3/TestInterface.php';
// test
$m = LimeMock::create('TestNamespace\\TestSubNamespace\\TestInterface');
// assertions
$interface = 'TestNamespace\\TestSubNamespace\\TestInterface';
$t->ok($m instanceof $interface, 'The mock implements the interface');
$t->ok($m instanceof LimeMockInterface, 'The mock implements "LimeMockInterface"');
} else {
$t->skip();
$t->skip();
}
// @Test: Abstract classes can be mocked
// test
$m = LimeMock::create('TestClassAbstract');
// assertions
$t->ok($m instanceof TestClassAbstract, 'The mock inherits the class');
$t->ok($m instanceof LimeMockInterface, 'The mock implements "LimeMockInterface"');
// @Test: Non-existing classes can be mocked
$m = LimeMock::create('FoobarClass');
// assertions
$t->ok($m instanceof FoobarClass, 'The mock generates and inherits the class');
$t->ok($m instanceof LimeMockInterface, 'The mock implements "LimeMockInterface"');
// @Test: Non-existing namespaced classes can be mocked (PHP 5.3)
if (version_compare(PHP_VERSION, '5.3', '>=')) {