X-Git-Url: https://git.heureux-cyclage.org/w/index.php?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2Fspecials%2FSpecialBooksourcesTest.php;h=074045d79f381cc66e90de7c427ec7d02204085e;hb=53779578b44575ef91feb3fad488f09b52f737d7;hp=3310d0217a10b8e809b23170e02e848551deb404;hpb=c340c41b37b5079ba90489f6b212bb8e4642031a;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/specials/SpecialBooksourcesTest.php b/tests/phpunit/includes/specials/SpecialBooksourcesTest.php index 3310d0217a..074045d79f 100644 --- a/tests/phpunit/includes/specials/SpecialBooksourcesTest.php +++ b/tests/phpunit/includes/specials/SpecialBooksourcesTest.php @@ -1,5 +1,5 @@ assertSame( $isValid, SpecialBookSources::isValidISBN( $isbn ) ); } + + protected function newSpecialPage() { + return new SpecialBookSources(); + } + + /** + * @covers SpecialBookSources::execute + */ + public function testExecute() { + list( $html, ) = $this->executeSpecialPage( 'Invalid', null, 'qqx' ); + $this->assertContains( '(booksources-invalid-isbn)', $html ); + list( $html, ) = $this->executeSpecialPage( '0-7475-3269-9', null, 'qqx' ); + $this->assertNotContains( '(booksources-invalid-isbn)', $html ); + $this->assertContains( '(booksources-text)', $html ); + } }