| 
                                
                                    @@ 35-55 (lines=21) @@
                                 | 
                            
                                                            
                                    | 32 | 
                                     | 
                                         *  | 
                                
                                                            
                                    | 33 | 
                                     | 
                                         * @see \eZ\Publish\API\Repository\LocationService::newLocationCreateStruct()  | 
                                
                                                            
                                    | 34 | 
                                     | 
                                         */  | 
                                
                                                            
                                    | 35 | 
                                     | 
                                        public function testNewLocationCreateStruct()  | 
                                
                                                            
                                    | 36 | 
                                     | 
                                        { | 
                                
                                                            
                                    | 37 | 
                                     | 
                                            $repository = $this->getRepository();  | 
                                
                                                            
                                    | 38 | 
                                     | 
                                     | 
                                
                                                            
                                    | 39 | 
                                     | 
                                            $parentLocationId = $this->generateId('location', 1); | 
                                
                                                            
                                    | 40 | 
                                     | 
                                            /* BEGIN: Use Case */  | 
                                
                                                            
                                    | 41 | 
                                     | 
                                            // $parentLocationId is the ID of an existing location  | 
                                
                                                            
                                    | 42 | 
                                     | 
                                            $locationService = $repository->getLocationService();  | 
                                
                                                            
                                    | 43 | 
                                     | 
                                     | 
                                
                                                            
                                    | 44 | 
                                     | 
                                            $locationCreate = $locationService->newLocationCreateStruct(  | 
                                
                                                            
                                    | 45 | 
                                     | 
                                                $parentLocationId  | 
                                
                                                            
                                    | 46 | 
                                     | 
                                            );  | 
                                
                                                            
                                    | 47 | 
                                     | 
                                            /* END: Use Case */  | 
                                
                                                            
                                    | 48 | 
                                     | 
                                     | 
                                
                                                            
                                    | 49 | 
                                     | 
                                            $this->assertInstanceOf(  | 
                                
                                                            
                                    | 50 | 
                                     | 
                                                '\\eZ\\Publish\\API\\Repository\\Values\\Content\\LocationCreateStruct',  | 
                                
                                                            
                                    | 51 | 
                                     | 
                                                $locationCreate  | 
                                
                                                            
                                    | 52 | 
                                     | 
                                            );  | 
                                
                                                            
                                    | 53 | 
                                     | 
                                     | 
                                
                                                            
                                    | 54 | 
                                     | 
                                            return $locationCreate;  | 
                                
                                                            
                                    | 55 | 
                                     | 
                                        }  | 
                                
                                                            
                                    | 56 | 
                                     | 
                                     | 
                                
                                                            
                                    | 57 | 
                                     | 
                                        /**  | 
                                
                                                            
                                    | 58 | 
                                     | 
                                         * Test for the newLocationCreateStruct() method.  | 
                                
                                                                                
                                 | 
                                
                                    @@ 316-334 (lines=19) @@
                                 | 
                            
                                                            
                                    | 313 | 
                                     | 
                                         * @see \eZ\Publish\API\Repository\LocationService::loadLocation()  | 
                                
                                                            
                                    | 314 | 
                                     | 
                                         * @depends eZ\Publish\API\Repository\Tests\LocationServiceTest::testCreateLocation  | 
                                
                                                            
                                    | 315 | 
                                     | 
                                         */  | 
                                
                                                            
                                    | 316 | 
                                     | 
                                        public function testLoadLocation()  | 
                                
                                                            
                                    | 317 | 
                                     | 
                                        { | 
                                
                                                            
                                    | 318 | 
                                     | 
                                            $repository = $this->getRepository();  | 
                                
                                                            
                                    | 319 | 
                                     | 
                                     | 
                                
                                                            
                                    | 320 | 
                                     | 
                                            $locationId = $this->generateId('location', 5); | 
                                
                                                            
                                    | 321 | 
                                     | 
                                            /* BEGIN: Use Case */  | 
                                
                                                            
                                    | 322 | 
                                     | 
                                            // $locationId is the ID of an existing location  | 
                                
                                                            
                                    | 323 | 
                                     | 
                                            $locationService = $repository->getLocationService();  | 
                                
                                                            
                                    | 324 | 
                                     | 
                                     | 
                                
                                                            
                                    | 325 | 
                                     | 
                                            $location = $locationService->loadLocation($locationId);  | 
                                
                                                            
                                    | 326 | 
                                     | 
                                            /* END: Use Case */  | 
                                
                                                            
                                    | 327 | 
                                     | 
                                     | 
                                
                                                            
                                    | 328 | 
                                     | 
                                            $this->assertInstanceOf(  | 
                                
                                                            
                                    | 329 | 
                                     | 
                                                '\\eZ\\Publish\\API\\Repository\\Values\\Content\\Location',  | 
                                
                                                            
                                    | 330 | 
                                     | 
                                                $location  | 
                                
                                                            
                                    | 331 | 
                                     | 
                                            );  | 
                                
                                                            
                                    | 332 | 
                                     | 
                                     | 
                                
                                                            
                                    | 333 | 
                                     | 
                                            return $location;  | 
                                
                                                            
                                    | 334 | 
                                     | 
                                        }  | 
                                
                                                            
                                    | 335 | 
                                     | 
                                     | 
                                
                                                            
                                    | 336 | 
                                     | 
                                        /**  | 
                                
                                                            
                                    | 337 | 
                                     | 
                                         * Test for the loadLocation() method.  |