1 | <?php |
||
16 | class LocationParserTest extends TestCase { |
||
17 | |||
18 | /** |
||
19 | * @dataProvider titleProvider |
||
20 | */ |
||
21 | public function testGivenTitleThatIsNotLink_titleIsSetAndLinkIsNot( $title ) { |
||
27 | |||
28 | protected function assertTitleAndLinkAre( Location $location, $title, $link ) { |
||
32 | |||
33 | protected function assertHasJsonKeyWithValue( Location $polygon, $key, $value ) { |
||
39 | |||
40 | public function titleProvider() { |
||
49 | |||
50 | /** |
||
51 | * @dataProvider linkProvider |
||
52 | */ |
||
53 | public function testGivenTitleThatIsLink_linkIsSetAndTitleIsNot( $link ) { |
||
59 | |||
60 | public function linkProvider() { |
||
66 | |||
67 | // /** |
||
68 | // * @dataProvider titleLinkProvider |
||
69 | // */ |
||
70 | // public function testGivenPageTitleAsLink_pageTitleIsTurnedIntoUrl( $link ) { |
||
71 | // $parser = new LocationParser(); |
||
72 | // $location = $parser->parse( '4,2~link:' . $link ); |
||
73 | // |
||
74 | // $linkUrl = Title::newFromText( $link )->getFullURL(); |
||
75 | // $this->assertTitleAndLinkAre( $location, '', $linkUrl ); |
||
76 | // } |
||
77 | // |
||
78 | // public function titleLinkProvider() { |
||
79 | // return array( |
||
80 | // array( 'Foo' ), |
||
81 | // array( 'Some_Page' ), |
||
82 | // ); |
||
83 | // } |
||
84 | |||
85 | public function testGivenAddressAndNoTitle_addressIsSetAsTitle() { |
||
93 | |||
94 | public function testGivenAddressAndTitle_addressIsNotUsedAsTitle() { |
||
102 | |||
103 | public function testGivenCoordinatesAndNoTitle_noTitleIsSet() { |
||
112 | |||
113 | } |
||
114 |