Skip to content

Commit

Permalink
Singularized Models directory for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
craig committed Jun 9, 2012
1 parent b6bf172 commit 5e9c90c
Show file tree
Hide file tree
Showing 22 changed files with 28 additions and 46 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function testGetAllClassNamesIsIdempotent()

public function testGetAllClassNamesReturnsAlreadyLoadedClassesIfAppropriate()
{
$rightClassName = 'Doctrine\Tests\ODM\PHPCR\Mapping\Models\FieldMappingObject';
$rightClassName = 'Doctrine\Tests\ODM\PHPCR\Mapping\Model\FieldMappingObject';
$this->ensureIsLoaded($rightClassName);

$driver = $this->loadDriverForTestMappingDocuments();
Expand All @@ -84,7 +84,7 @@ public function testGetAllClassNamesReturnsOnlyTheAppropriateClasses()
*/
public function testLoadFieldMapping()
{
$className = 'Doctrine\Tests\ODM\PHPCR\Mapping\Models\FieldMappingObject';
$className = 'Doctrine\Tests\ODM\PHPCR\Mapping\Model\FieldMappingObject';
return $this->loadMetadataForClassName($className);
}

Expand Down Expand Up @@ -268,7 +268,7 @@ public function testUriFieldMappings($class)

public function testLoadNodenameMapping()
{
$className = 'Doctrine\Tests\ODM\PHPCR\Mapping\Models\NodenameMappingObject';
$className = 'Doctrine\Tests\ODM\PHPCR\Mapping\Model\NodenameMappingObject';

return $this->loadMetadataForClassname($className);
}
Expand All @@ -285,7 +285,7 @@ public function testNodenameMapping($class)

public function testLoadParentDocumentMapping()
{
$className = 'Doctrine\Tests\ODM\PHPCR\Mapping\Models\ParentDocumentMappingObject';
$className = 'Doctrine\Tests\ODM\PHPCR\Mapping\Model\ParentDocumentMappingObject';

return $this->loadMetadataForClassname($className);
}
Expand All @@ -302,7 +302,7 @@ public function testParentDocumentMapping($class)

public function testLoadChildMapping()
{
$className = 'Doctrine\Tests\ODM\PHPCR\Mapping\Models\ChildMappingObject';
$className = 'Doctrine\Tests\ODM\PHPCR\Mapping\Model\ChildMappingObject';

return $this->loadMetadataForClassname($className);
}
Expand All @@ -323,7 +323,7 @@ public function testChildMapping($class)

public function testLoadChildrenMapping()
{
$className = 'Doctrine\Tests\ODM\PHPCR\Mapping\Models\ChildrenMappingObject';
$className = 'Doctrine\Tests\ODM\PHPCR\Mapping\Model\ChildrenMappingObject';

return $this->loadMetadataForClassname($className);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ protected function loadDriver()
protected function loadDriverForTestMappingDocuments()
{
$annotationDriver = $this->loadDriver();
$annotationDriver->addPaths(array(__DIR__ . '/Models'));
$annotationDriver->addPaths(array(__DIR__ . '/Model'));
return $annotationDriver;
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Doctrine\Tests\ODM\PHPCR\Mapping\Models;
namespace Doctrine\Tests\ODM\PHPCR\Mapping\Model;

use Doctrine\ODM\PHPCR\Mapping\Annotations as PHPCRODM;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Doctrine\Tests\ODM\PHPCR\Mapping\Models;
namespace Doctrine\Tests\ODM\PHPCR\Mapping\Model;

use Doctrine\ODM\PHPCR\Mapping\Annotations as PHPCRODM;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Doctrine\Tests\ODM\PHPCR\Mapping\Models;
namespace Doctrine\Tests\ODM\PHPCR\Mapping\Model;

use Doctrine\ODM\PHPCR\Mapping\Annotations as PHPCRODM;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Doctrine\Tests\ODM\PHPCR\Mapping\Models;
namespace Doctrine\Tests\ODM\PHPCR\Mapping\Model;

use Doctrine\ODM\PHPCR\Mapping\Annotations as PHPCRODM;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Doctrine\Tests\ODM\PHPCR\Mapping\Models;
namespace Doctrine\Tests\ODM\PHPCR\Mapping\Model;

use Doctrine\ODM\PHPCR\Mapping\Annotations as PHPCRODM;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<doctrine-mapping>
<document name="Doctrine\Tests\ODM\PHPCR\Mapping\Models\ChildMappingObject">
<document name="Doctrine\Tests\ODM\PHPCR\Mapping\Model\ChildMappingObject">
<id name="id" />
<child fieldName="child1" name="first" />
<child fieldName="child2" name="second" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<doctrine-mapping>
<document name="Doctrine\Tests\ODM\PHPCR\Mapping\Models\ChildrenMappingObject">
<document name="Doctrine\Tests\ODM\PHPCR\Mapping\Model\ChildrenMappingObject">
<id name="id" />
<children fieldName="all" name="all" />
<children fieldName="some" name="some" filter="*some*" fetchDepth="2" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<doctrine-mapping>
<document name="Doctrine\Tests\ODM\PHPCR\Mapping\Models\FieldMappingObject">
<document name="Doctrine\Tests\ODM\PHPCR\Mapping\Model\FieldMappingObject">
<id name="id" />
<field fieldName="string" type="string" />
<field fieldName="binary" type="binary" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<doctrine-mapping>
<document name="Doctrine\Tests\ODM\PHPCR\Mapping\Models\NodenameMappingObject">
<document name="Doctrine\Tests\ODM\PHPCR\Mapping\Model\NodenameMappingObject">
<id name="id" />
<nodename name="namefield" />
</document>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<doctrine-mapping>
<document name="Doctrine\Tests\ODM\PHPCR\Mapping\Models\ParentDocumentMappingObject">
<document name="Doctrine\Tests\ODM\PHPCR\Mapping\Model\ParentDocumentMappingObject">
<id name="id" />
<parentdocument name="parent" />
</document>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Doctrine\Tests\ODM\PHPCR\Mapping\Models\ChildMappingObject:
Doctrine\Tests\ODM\PHPCR\Mapping\Model\ChildMappingObject:
id: id
child:
child1:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Doctrine\Tests\ODM\PHPCR\Mapping\Models\ChildrenMappingObject:
Doctrine\Tests\ODM\PHPCR\Mapping\Model\ChildrenMappingObject:
id: id
children:
all:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Doctrine\Tests\ODM\PHPCR\Mapping\Models\FieldMappingObject:
Doctrine\Tests\ODM\PHPCR\Mapping\Model\FieldMappingObject:
id: id
fields:
string: string
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Doctrine\Tests\ODM\PHPCR\Mapping\Model\NodenameMappingObject:
id: id
nodename: namefield
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Doctrine\Tests\ODM\PHPCR\Mapping\Model\ParentDocumentMappingObject:
id: id
parentdocument: parent

This file was deleted.

This file was deleted.

This file was deleted.

2 changes: 1 addition & 1 deletion tests/Doctrine/Tests/ODM/PHPCR/Mapping/XmlDriverTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class XmlDriverTest extends AbstractMappingDriverTest
*/
protected function loadDriver()
{
$location = __DIR__ . '/Models/xml';
$location = __DIR__ . '/Model/xml';

return new \Doctrine\ODM\PHPCR\Mapping\Driver\XmlDriver($location);
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Doctrine/Tests/ODM/PHPCR/Mapping/YamlDriverTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class YamlDriverTest extends AbstractMappingDriverTest
*/
protected function loadDriver()
{
$location = __DIR__ . '/Models/yml';
$location = __DIR__ . '/Model/yml';

return new \Doctrine\ODM\PHPCR\Mapping\Driver\YamlDriver($location);
}
Expand Down

0 comments on commit 5e9c90c

Please sign in to comment.