Skip to content

Commit

Permalink
Add test for getListUrl()
Browse files Browse the repository at this point in the history
  • Loading branch information
mklkj committed Mar 31, 2018
1 parent 1d3aaf6 commit a4b5633
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/TimetableListTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ public function setUp()
$this->expandable = new TimetableList(file_get_contents(__DIR__.'/fixtures/lista-expandable.html'));
}

public function testGetListUrl(): void
{
$index = new TimetableList(file_get_contents(__DIR__.'/fixtures/index.html'));
$this->assertEquals('lista.html', $index->getListUrl());
}

public function testClassDataSelect(): void
{
$this->assertCount(2, $this->select->getTimetableList()['classes']);
Expand Down
17 changes: 17 additions & 0 deletions tests/fixtures/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Language" content="pl">
<meta name="description" content="Plan lekcji w szkole ...">
<title>.Plan lekcji</title>
</head>
<frameset rows="*,40">
<frame name="plan" src="plany/o1.html" marginwidth="0" marginheight="0" scrolling="auto">
<frame name="list" target="plan" src="lista.html" marginwidth="0" marginheight="0" scrolling="auto">
<noframes>
<body>
<p>Ta strona używa ramek, których Twoja przegl±darka nie obsługuje!</p>
</body>
</noframes>
</frameset>
</html>

0 comments on commit a4b5633

Please sign in to comment.