X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=web%2Fcore%2Fmodules%2Fblock_content%2Ftests%2Fsrc%2FFunctional%2FBlockContentListViewsTest.php;fp=web%2Fcore%2Fmodules%2Fblock_content%2Fsrc%2FTests%2FBlockContentListViewsTest.php;h=1c623be82eba3c9cf4af6525a00f07fa3971df37;hb=bfbba508964731508b9bd6d5835c2edc858db95b;hp=77117fb009fe6073cb0db07b8f774047a639daf9;hpb=cb9a80db11fc6b014e5b1e693a5a391c95eb5d9a;p=yaffs-website diff --git a/web/core/modules/block_content/src/Tests/BlockContentListViewsTest.php b/web/core/modules/block_content/tests/src/Functional/BlockContentListViewsTest.php similarity index 91% rename from web/core/modules/block_content/src/Tests/BlockContentListViewsTest.php rename to web/core/modules/block_content/tests/src/Functional/BlockContentListViewsTest.php index 77117fb00..1c623be82 100644 --- a/web/core/modules/block_content/src/Tests/BlockContentListViewsTest.php +++ b/web/core/modules/block_content/tests/src/Functional/BlockContentListViewsTest.php @@ -1,6 +1,6 @@ assertEqual(count($elements), 4, 'Correct number of table header cells found.'); // Test the contents of each th cell. - $expected_items = ['Block description', 'Block type', 'Updated', 'Operations']; + $expected_items = ['Block description', 'Block type', 'Updated Sort ascending', 'Operations']; foreach ($elements as $key => $element) { - if ($element->xpath('a')) { - $this->assertIdentical(trim((string) $element->xpath('a')[0]), $expected_items[$key]); + if ($element->find('xpath', 'a')) { + $this->assertIdentical(trim($element->find('xpath', 'a')->getText()), $expected_items[$key]); } else { - $this->assertIdentical(trim((string) $element[0]), $expected_items[$key]); + $this->assertIdentical(trim($element->getText()), $expected_items[$key]); } } @@ -73,7 +73,7 @@ class BlockContentListViewsTest extends BlockContentTestBase { // Check the contents of each row cell. The first cell contains the label, // the second contains the machine name, and the third contains the // operations list. - $this->assertIdentical((string) $elements[0]->xpath('a')[0], $label); + $this->assertIdentical($elements[0]->find('xpath', 'a')->getText(), $label); // Edit the entity using the operations link. $blocks = $this->container