f5f9e71dc228782051938ca231c5d61589419ef6
[GitHub/WoltLab/WCF.git] /
1 <?php
2
3 /*
4 * This file is part of the Symfony package.
5 *
6 * (c) Fabien Potencier <fabien@symfony.com>
7 *
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
10 */
11
12 namespace Symfony\Component\CssSelector\Tests\Parser\Handler;
13
14 use Symfony\Component\CssSelector\Parser\Handler\WhitespaceHandler;
15 use Symfony\Component\CssSelector\Parser\Token;
16
17 class WhitespaceHandlerTest extends AbstractHandlerTest
18 {
19 public function getHandleValueTestData()
20 {
21 return array(
22 array(' ', new Token(Token::TYPE_WHITESPACE, ' ', 0), ''),
23 array("\n", new Token(Token::TYPE_WHITESPACE, "\n", 0), ''),
24 array("\t", new Token(Token::TYPE_WHITESPACE, "\t", 0), ''),
25
26 array(' foo', new Token(Token::TYPE_WHITESPACE, ' ', 0), 'foo'),
27 array(' .foo', new Token(Token::TYPE_WHITESPACE, ' ', 0), '.foo'),
28 );
29 }
30
31 public function getDontHandleValueTestData()
32 {
33 return array(
34 array('>'),
35 array('1'),
36 array('a'),
37 );
38 }
39
40 protected function generateHandler()
41 {
42 return new WhitespaceHandler();
43 }
44 }