fix all the tests (for sqlite, php7.4, osx, at least)

This commit is contained in:
Shish
2020-01-28 21:19:59 +00:00
parent ac1076b3f3
commit 615da9e9d2
57 changed files with 665 additions and 859 deletions

View File

@ -5,21 +5,12 @@ class LinkImageTest extends ShimmiePHPUnitTestCase
{
$this->log_in_as_user();
$image_id = $this->post_image("tests/pbx_screenshot.jpg", "pie");
# FIXME
# look in the "plain text link to post" box, follow the link
# in there, see if it takes us to the right page
$this->get_page("post/view/$image_id");
$this->markTestIncomplete();
// FIXME
$matches = [];
preg_match("#value='(http://.*(/|%2F)post(/|%2F)view(/|%2F)[0-9]+)'#", $this->page_to_text(), $matches);
preg_match("#value='https?://.*/(post/view/[0-9]+)'#", $this->page_to_text(), $matches);
$this->assertTrue(count($matches) > 0);
if ($matches) {
$this->get($matches[1]);
$this->assert_title("Image $image_id: pie");
}
$page = $this->get_page($matches[1]);
$this->assertEquals("Image $image_id: pie", $page->title);
}
}