array() ), ), array( array( 'test' => array( 'key' => 'val%sue', 'test' => 'test' ) ), ), ); } /** * @dataProvider getFilterTestDataValid * @group Core */ public function testFilterValid($translations) { $filter = new NoScripts(); $result = $filter->isValid($translations); $this->assertTrue($result); } public function getFilterTestDataInvalid() { return array( array( array( 'test' => array( 'test' => 'test text array( 'test' => 'tüsest' ), 'test' => array( 'test' => 'bla link ', 'empty' => '˜', ) ), ), array( array( 'test' => array( 'test' => 'bla link' ) ), ), array( array( 'test' => array( 'test' => 'no ' ) ), ), array( array( 'test' => array( 'test' => 'that will fail on document. or not?' ) ), ), array( array( 'test' => array( 'test' => 'bla link' ) ), ), ); } /** * @dataProvider getFilterTestDataInvalid * @group Core */ public function testFilterInvalid($translations) { $filter = new NoScripts(); $result = $filter->isValid($translations); $this->assertFalse($result); } }