public function testAddRulesUsingArrayOfRules() { $o = new AllOf(); $o->addRules([[$x = new IntVal(), new Positive()]]); $this->assertTrue($o->hasRule($x)); $this->assertTrue($o->hasRule('Positive')); }