/** * @dataProvider provideCountAcceptance */ public function testCountAcceptance($selector, $html, $expected, $success = TRUE) { if (!$success) { $this->expectAssertionFail(); } $tester = new CSSTester($this, $selector, $html); $tester->count($expected); }
/** * * für die Constraints siehe CSSTester * $test->css('form.myclass', '<form class="myclass">[...]</form>') * ->count(1) // OK * * $test->css('form.otherclass', '<form class="myclass">[...]</form>') * ->count(1) // Failure * * $test->css('form.otherclass', '<form class="myclass">[...]</form>') * ->count(0) // OK * * $test->css('form.myclass', '<form class="myclass">[...]</form>') * ->count(0) // Failure * * @params string $selector, mixed $html * @params jQuery $jQuery * @return Psc\Code\Test\CSSTester */ public function css($selector, $html = NULL) { $css = new CSSTester($this->testCase, $selector, $html); $css->asContext(); return $css; }