本文整理汇总了PHP中LimeTest::isntSame方法的典型用法代码示例。如果您正苦于以下问题:PHP LimeTest::isntSame方法的具体用法?PHP LimeTest::isntSame怎么用?PHP LimeTest::isntSame使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LimeTest
的用法示例。
在下文中一共展示了LimeTest::isntSame方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
{
return $this->foo;
}
}
// @Before
$paramHolder = new Sonata_ParameterHolder();
$paramHolder->add($params = array('foo' => 42, 'bar' => 4711, 'baz' => new Foo()));
// @After
unset($paramHolder);
unset($params);
// @Test: ->add()
$t->is($paramHolder->getAll(), $params, 'All parameters were added correctly');
$paramHolder->add(null);
$t->isnt($paramHolder->getAll(), null, 'Nothing is added if NULL was given');
$paramHolder->add(array());
$t->isntSame($paramHolder->getAll(), array(), 'Nothing is added if an empty array was given');
$paramHolder->add('this fails');
$t->isnt($paramHolder->getAll(), 'this fails', 'Nothing is added if parameter isn\'t an array');
// @Test: ->get()
$foo = $paramHolder->get('foo');
$t->is($foo, 42, 'The value is retrieved correctly');
$rex = $paramHolder->get('rex');
$t->is($rex, null, 'NULL is returned if the parameter could not be found');
$rex = $paramHolder->get('rex', 'fido');
$t->is($rex, 'fido', 'If a default value is given for a non-existing parameter, the default value is returned');
// @Test: ->getNames()
$t->same($paramHolder->getNames(), array('foo', 'bar', 'baz'), 'All parameter names are retrieved correctly');
// @Test: ->has()
$t->is($paramHolder->has('foo'), true, 'TRUE is returned if the parameter exists');
$t->is($paramHolder->has('rex'), false, 'FALSE is returned if the parameter does not exist');
// @Test: ->remove()