Skip to content

Commit f94aac4

Browse files
committed
fix tests
1 parent cf19042 commit f94aac4

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

Tests/WebTest/Admin/PageAdminTest.php

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,18 @@ public function testPageList()
2424

2525
public function testPageEdit()
2626
{
27-
$crawler = $this->client->request('GET', '/admin/cmf/simplecms/page/test/pages/homepage/edit');
27+
$crawler = $this->client->request('GET', '/admin/cmf/simplecms/page/test/page/homepage/edit');
2828
$res = $this->client->getResponse();
2929
$this->assertEquals(200, $res->getStatusCode());
30-
$this->assertCount(1, $crawler->filter('input[value="homepage"]'));
30+
$this->assertCount(2, $crawler->filter('input[value="homepage"]'));
3131
}
3232

3333
public function testPageShow()
3434
{
35-
return;
36-
$crawler = $this->client->request('GET', '/admin/cmf/simplecms/page/test/pages/homepage/show');
35+
$crawler = $this->client->request('GET', '/admin/cmf/simplecms/page/test/page/homepage/show');
3736
$res = $this->client->getResponse();
3837
$this->assertEquals(200, $res->getStatusCode());
39-
$this->assertCount(2, $crawler->filter('td:contains("test-page")'));
38+
$this->assertCount(1, $crawler->filter('html:contains("homepage")'));
4039
}
4140

4241
public function testPageCreate()
@@ -51,9 +50,9 @@ public function testPageCreate()
5150
$actionUrl = $node->getAttribute('action');
5251
$uniqId = substr(strchr($actionUrl, '='), 1);
5352

54-
$form[$uniqId.'[parent]'] = '/test/pages';
55-
$form[$uniqId.'[title]'] = 'foo-page';
56-
$form[$uniqId.'[label]'] = 'Foo Page';
53+
$form[$uniqId.'[parent]'] = '/test/page';
54+
$form[$uniqId.'[name]'] = 'foo-test';
55+
$form[$uniqId.'[title]'] = 'Foo Test';
5756

5857
$this->client->submit($form);
5958
$res = $this->client->getResponse();

0 commit comments

Comments
 (0)