@@ -31,126 +31,126 @@ protected function setUp(): void
3131
3232 public function testHelperReturnsStringAsIsIfCurrentIsNotSet ()
3333 {
34- $ this ->assertEquals ('foo/bar.html ' , Hyde::relativeLink ('foo/bar.html ' ));
34+ $ this ->assertSame ('foo/bar.html ' , Hyde::relativeLink ('foo/bar.html ' ));
3535 }
3636
3737 public function testHelperInjectsProperNumberOfDoublesSlash ()
3838 {
3939 $ this ->mockCurrentPage ('foo/bar.html ' );
40- $ this ->assertEquals ('../foo.html ' , Hyde::relativeLink ('foo.html ' ));
40+ $ this ->assertSame ('../foo.html ' , Hyde::relativeLink ('foo.html ' ));
4141 }
4242
4343 public function testHelperInjectsProperNumberOfDoublesSlashForDeeplyNestedPaths ()
4444 {
4545 $ this ->mockCurrentPage ('foo/bar/baz/qux.html ' );
46- $ this ->assertEquals ('../../../foo.html ' , Hyde::relativeLink ('foo.html ' ));
46+ $ this ->assertSame ('../../../foo.html ' , Hyde::relativeLink ('foo.html ' ));
4747 }
4848
4949 public function testHelperHandlesDestinationWithoutFileExtension ()
5050 {
5151 $ this ->mockCurrentPage ('foo/bar.html ' );
52- $ this ->assertEquals ('../foo ' , Hyde::relativeLink ('foo ' ));
52+ $ this ->assertSame ('../foo ' , Hyde::relativeLink ('foo ' ));
5353 }
5454
5555 public function testHelperHandlesCurrentWithoutFileExtension ()
5656 {
5757 $ this ->mockCurrentPage ('foo/bar ' );
58- $ this ->assertEquals ('../foo.html ' , Hyde::relativeLink ('foo.html ' ));
58+ $ this ->assertSame ('../foo.html ' , Hyde::relativeLink ('foo.html ' ));
5959 }
6060
6161 public function testHelperHandlesCaseWithoutAnyFileExtensions ()
6262 {
6363 $ this ->mockCurrentPage ('foo/bar ' );
64- $ this ->assertEquals ('../foo ' , Hyde::relativeLink ('foo ' ));
64+ $ this ->assertSame ('../foo ' , Hyde::relativeLink ('foo ' ));
6565 }
6666
6767 public function testHelperHandlesCaseWithMixedFileExtensions ()
6868 {
6969 $ this ->mockCurrentPage ('foo/bar.md ' );
70- $ this ->assertEquals ('../foo.md ' , Hyde::relativeLink ('foo.md ' ));
70+ $ this ->assertSame ('../foo.md ' , Hyde::relativeLink ('foo.md ' ));
7171 $ this ->mockCurrentPage ('foo/bar.txt ' );
72- $ this ->assertEquals ('../foo.txt ' , Hyde::relativeLink ('foo.txt ' ));
72+ $ this ->assertSame ('../foo.txt ' , Hyde::relativeLink ('foo.txt ' ));
7373 }
7474
7575 public function testHelperHandlesDifferentFileExtensions ()
7676 {
7777 $ this ->mockCurrentPage ('foo/bar ' );
78- $ this ->assertEquals ('../foo.png ' , Hyde::relativeLink ('foo.png ' ));
79- $ this ->assertEquals ('../foo.css ' , Hyde::relativeLink ('foo.css ' ));
80- $ this ->assertEquals ('../foo.js ' , Hyde::relativeLink ('foo.js ' ));
78+ $ this ->assertSame ('../foo.png ' , Hyde::relativeLink ('foo.png ' ));
79+ $ this ->assertSame ('../foo.css ' , Hyde::relativeLink ('foo.css ' ));
80+ $ this ->assertSame ('../foo.js ' , Hyde::relativeLink ('foo.js ' ));
8181 }
8282
8383 public function testHelperReturnsPrettyUrlIfEnabledAndDestinationIsAHtmlFile ()
8484 {
8585 self ::mockConfig (['hyde.pretty_urls ' => true ]);
8686 $ this ->mockCurrentPage ('foo/bar.html ' );
87- $ this ->assertEquals ('../foo ' , Hyde::relativeLink ('foo.html ' ));
87+ $ this ->assertSame ('../foo ' , Hyde::relativeLink ('foo.html ' ));
8888 }
8989
9090 public function testHelperMethodDoesNotRequireCurrentPathToBeHtmlToUsePrettyUrls ()
9191 {
9292 self ::mockConfig (['hyde.pretty_urls ' => true ]);
9393 $ this ->mockCurrentPage ('foo/bar ' );
94- $ this ->assertEquals ('../foo ' , Hyde::relativeLink ('foo.html ' ));
94+ $ this ->assertSame ('../foo ' , Hyde::relativeLink ('foo.html ' ));
9595 }
9696
9797 public function testHelperReturnsDoesNotReturnPrettyUrlIfWhenEnabledButAndDestinationIsNotAHtmlFile ()
9898 {
9999 self ::mockConfig (['hyde.pretty_urls ' => true ]);
100100 $ this ->mockCurrentPage ('foo/bar.html ' );
101- $ this ->assertEquals ('../foo.png ' , Hyde::relativeLink ('foo.png ' ));
101+ $ this ->assertSame ('../foo.png ' , Hyde::relativeLink ('foo.png ' ));
102102 }
103103
104104 public function testHelperRewritesIndexWhenUsingPrettyUrls ()
105105 {
106106 self ::mockConfig (['hyde.pretty_urls ' => true ]);
107107 $ this ->mockCurrentPage ('foo.html ' );
108- $ this ->assertEquals ('./ ' , Hyde::relativeLink ('index.html ' ));
108+ $ this ->assertSame ('./ ' , Hyde::relativeLink ('index.html ' ));
109109 $ this ->mockCurrentPage ('foo/bar.html ' );
110- $ this ->assertEquals ('../ ' , Hyde::relativeLink ('index.html ' ));
110+ $ this ->assertSame ('../ ' , Hyde::relativeLink ('index.html ' ));
111111 $ this ->mockCurrentPage ('foo/bar/baz.html ' );
112- $ this ->assertEquals ('../../ ' , Hyde::relativeLink ('index.html ' ));
112+ $ this ->assertSame ('../../ ' , Hyde::relativeLink ('index.html ' ));
113113 }
114114
115115 public function testHelperDoesNotRewriteIndexWhenNotUsingPrettyUrls ()
116116 {
117117 self ::mockConfig (['hyde.pretty_urls ' => false ]);
118118 $ this ->mockCurrentPage ('foo.html ' );
119- $ this ->assertEquals ('index.html ' , Hyde::relativeLink ('index.html ' ));
119+ $ this ->assertSame ('index.html ' , Hyde::relativeLink ('index.html ' ));
120120 $ this ->mockCurrentPage ('foo/bar.html ' );
121- $ this ->assertEquals ('../index.html ' , Hyde::relativeLink ('index.html ' ));
121+ $ this ->assertSame ('../index.html ' , Hyde::relativeLink ('index.html ' ));
122122 $ this ->mockCurrentPage ('foo/bar/baz.html ' );
123- $ this ->assertEquals ('../../index.html ' , Hyde::relativeLink ('index.html ' ));
123+ $ this ->assertSame ('../../index.html ' , Hyde::relativeLink ('index.html ' ));
124124 }
125125
126126 public function testHelperRewritesDocumentationPageIndexWhenUsingPrettyUrls ()
127127 {
128128 self ::mockConfig (['hyde.pretty_urls ' => true ]);
129129 $ this ->mockCurrentPage ('foo.html ' );
130- $ this ->assertEquals ('docs/ ' , Hyde::relativeLink ('docs/index.html ' ));
130+ $ this ->assertSame ('docs/ ' , Hyde::relativeLink ('docs/index.html ' ));
131131 $ this ->mockCurrentPage ('docs.html ' );
132- $ this ->assertEquals ('docs/ ' , Hyde::relativeLink ('docs/index.html ' ));
132+ $ this ->assertSame ('docs/ ' , Hyde::relativeLink ('docs/index.html ' ));
133133 $ this ->mockCurrentPage ('foo/bar.html ' );
134- $ this ->assertEquals ('../docs/ ' , Hyde::relativeLink ('docs/index.html ' ));
134+ $ this ->assertSame ('../docs/ ' , Hyde::relativeLink ('docs/index.html ' ));
135135 $ this ->mockCurrentPage ('docs/foo.html ' );
136- $ this ->assertEquals ('../docs/ ' , Hyde::relativeLink ('docs/index.html ' ));
136+ $ this ->assertSame ('../docs/ ' , Hyde::relativeLink ('docs/index.html ' ));
137137 }
138138
139139 public function testHelperDoesNotRewriteDocumentationPageIndexWhenNotUsingPrettyUrls ()
140140 {
141141 self ::mockConfig (['hyde.pretty_urls ' => false ]);
142142 $ this ->mockCurrentPage ('foo.html ' );
143- $ this ->assertEquals ('docs/index.html ' , Hyde::relativeLink ('docs/index.html ' ));
143+ $ this ->assertSame ('docs/index.html ' , Hyde::relativeLink ('docs/index.html ' ));
144144 $ this ->mockCurrentPage ('docs.html ' );
145- $ this ->assertEquals ('docs/index.html ' , Hyde::relativeLink ('docs/index.html ' ));
145+ $ this ->assertSame ('docs/index.html ' , Hyde::relativeLink ('docs/index.html ' ));
146146 $ this ->mockCurrentPage ('foo/bar.html ' );
147- $ this ->assertEquals ('../docs/index.html ' , Hyde::relativeLink ('docs/index.html ' ));
147+ $ this ->assertSame ('../docs/index.html ' , Hyde::relativeLink ('docs/index.html ' ));
148148 $ this ->mockCurrentPage ('docs/foo.html ' );
149- $ this ->assertEquals ('../docs/index.html ' , Hyde::relativeLink ('docs/index.html ' ));
149+ $ this ->assertSame ('../docs/index.html ' , Hyde::relativeLink ('docs/index.html ' ));
150150 }
151151
152152 public function testHelperDoesNotRewriteAlreadyProcessedLinks ()
153153 {
154- $ this ->assertEquals ('../foo ' , Hyde::relativeLink ('../foo ' ));
154+ $ this ->assertSame ('../foo ' , Hyde::relativeLink ('../foo ' ));
155155 }
156156}
0 commit comments