1 | <?php |
||
16 | class LocationParserTest extends \ValueParsers\Test\StringValueParserTest { |
||
17 | |||
18 | /** |
||
19 | * @see ValueParserTestBase::validInputProvider |
||
20 | * |
||
21 | * @since 3.0 |
||
22 | * |
||
23 | * @return array |
||
24 | */ |
||
25 | public function validInputProvider() { |
||
50 | |||
51 | /** |
||
52 | * @see ValueParserTestBase::requireDataValue |
||
53 | * |
||
54 | * @since 3.0 |
||
55 | * |
||
56 | * @return boolean |
||
57 | */ |
||
58 | protected function requireDataValue() { |
||
61 | |||
62 | /** |
||
63 | * @dataProvider titleProvider |
||
64 | */ |
||
65 | public function testGivenTitleThatIsNotLink_titleIsSetAndLinkIsNot( $title ) { |
||
71 | |||
72 | public function titleProvider() { |
||
81 | |||
82 | protected function assertTitleAndLinkAre( Location $location, $title, $link ) { |
||
86 | |||
87 | protected function assertHasJsonKeyWithValue( Location $polygon, $key, $value ) { |
||
96 | |||
97 | /** |
||
98 | * @dataProvider linkProvider |
||
99 | */ |
||
100 | public function testGivenTitleThatIsLink_linkIsSetAndTitleIsNot( $link ) { |
||
106 | |||
107 | public function linkProvider() { |
||
114 | |||
115 | /** |
||
116 | * @dataProvider titleLinkProvider |
||
117 | */ |
||
118 | // public function testGivenPageTitleAsLink_pageTitleIsTurnedIntoUrl( $link ) { |
||
119 | // $parser = new LocationParser(); |
||
120 | // $location = $parser->parse( '4,2~link:' . $link ); |
||
121 | // |
||
122 | // $linkUrl = Title::newFromText( $link )->getFullURL(); |
||
123 | // $this->assertTitleAndLinkAre( $location, '', $linkUrl ); |
||
124 | // } |
||
125 | // |
||
126 | // public function titleLinkProvider() { |
||
127 | // return array( |
||
128 | // array( 'Foo' ), |
||
129 | // array( 'Some_Page' ), |
||
130 | // ); |
||
131 | // } |
||
132 | |||
133 | protected function getInstance() { |
||
136 | |||
137 | } |
||
138 |