| @@ 84-104 (lines=21) @@ | ||
| 81 | /** |
|
| 82 | * @covers eZ\Publish\Core\Persistence\Legacy\Content\Section\Gateway\DoctrineDatabase::updateSection |
|
| 83 | */ |
|
| 84 | public function testUpdateSection() |
|
| 85 | { |
|
| 86 | $gateway = $this->getDatabaseGateway(); |
|
| 87 | ||
| 88 | $gateway->updateSection(2, 'New Section', 'new_section'); |
|
| 89 | ||
| 90 | $this->assertQueryResult( |
|
| 91 | array( |
|
| 92 | array( |
|
| 93 | 'id' => '2', |
|
| 94 | 'identifier' => 'new_section', |
|
| 95 | 'name' => 'New Section', |
|
| 96 | 'locale' => '', |
|
| 97 | ), |
|
| 98 | ), |
|
| 99 | $this->getDatabaseHandler()->createSelectQuery() |
|
| 100 | ->select('id', 'identifier', 'name', 'locale') |
|
| 101 | ->from('ezsection') |
|
| 102 | ->where('id=2') |
|
| 103 | ); |
|
| 104 | } |
|
| 105 | ||
| 106 | /** |
|
| 107 | * @covers eZ\Publish\Core\Persistence\Legacy\Content\Section\Gateway\DoctrineDatabase::loadSectionData |
|
| @@ 843-871 (lines=29) @@ | ||
| 840 | * @covers eZ\Publish\Core\Persistence\Legacy\Content\Type\Gateway\DoctrineDatabase::insertGroupAssignment |
|
| 841 | * @covers eZ\Publish\Core\Persistence\Legacy\Content\Type\Gateway\DoctrineDatabase::loadGroupData |
|
| 842 | */ |
|
| 843 | public function testInsertGroupAssignment() |
|
| 844 | { |
|
| 845 | $this->insertDatabaseFixture( |
|
| 846 | __DIR__ . '/_fixtures/existing_groups.php' |
|
| 847 | ); |
|
| 848 | ||
| 849 | $gateway = $this->getGateway(); |
|
| 850 | ||
| 851 | $gateway->insertGroupAssignment(3, 42, 1); |
|
| 852 | ||
| 853 | $this->assertQueryResult( |
|
| 854 | array( |
|
| 855 | array( |
|
| 856 | 'contentclass_id' => '42', |
|
| 857 | 'contentclass_version' => '1', |
|
| 858 | 'group_id' => '3', |
|
| 859 | 'group_name' => 'Media', |
|
| 860 | ), |
|
| 861 | ), |
|
| 862 | $this->getDatabaseHandler() |
|
| 863 | ->createSelectQuery() |
|
| 864 | ->select( |
|
| 865 | 'contentclass_id', |
|
| 866 | 'contentclass_version', |
|
| 867 | 'group_id', |
|
| 868 | 'group_name' |
|
| 869 | )->from('ezcontentclass_classgroup') |
|
| 870 | ); |
|
| 871 | } |
|
| 872 | ||
| 873 | /** |
|
| 874 | * @covers eZ\Publish\Core\Persistence\Legacy\Content\Type\Gateway\DoctrineDatabase::deleteGroupAssignment |
|