Beispiel #1
0
    public function testAssertRuleFailFailing()
    {
        $code = <<<EOD
class foobar {
\tpublic function bar() {
\t\treturn false;
\t}
}
EOD;
        $unit = new Rule();
        $expected = false;
        $result = $unit->assertRuleFail($code, $this->_rule);
        $this->assertIdentical($expected, $result);
    }
Beispiel #2
0
 protected function _rule($rule, array $options = array())
 {
     if (isset($this->rule)) {
         return $this->rule;
     }
     return parent::_rule($rule, $options);
 }