negative_match_data(), $this->optional_only_data() ); } public function nonstrict_positive_match_data() { return array_merge( $this->positive_match_data(), $this->optional_only_data() ); } /** * @dataProvider positive_match_data */ public function test_strict_positive_match($input) { $this->assertFalse( phpbb_validate_hex_colour($input, false), "Failed asserting that $input passes as a valid hex colour." ); } /** * @dataProvider strict_negative_match_data */ public function test_strict_negative_match($input) { $this->assertSame( 'WRONG_DATA', phpbb_validate_hex_colour($input, false), "Failed asserting that $input does not pass as a valid hex colour." ); } /** * @dataProvider nonstrict_positive_match_data */ public function test_nonstrict_positive_match($input) { $this->assertFalse( phpbb_validate_hex_colour($input, true), "Failed asserting that $input passes as a valid or optional hex colour." ); } /** * @dataProvider negative_match_data */ public function test_nonstrict_negative_match($input) { $this->assertSame( 'WRONG_DATA', phpbb_validate_hex_colour($input, true), "Failed asserting that $input does not pass as a valid or optional hex colour." ); } }