Skip to content

Commit

Permalink
Changed namespace to Kdyby\Doctrine\MagicAccessors
Browse files Browse the repository at this point in the history
  • Loading branch information
fprochazka committed Mar 29, 2016
1 parent 9e528b3 commit da26e4a
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 27 deletions.
2 changes: 1 addition & 1 deletion composer.json
Expand Up @@ -25,7 +25,7 @@
},
"autoload": {
"psr-4": {
"Kdyby\\DoctrineMagicAccessors\\": "src/"
"Kdyby\\Doctrine\\MagicAccessors\\": "src/"
},
"classmap": [
"src/exceptions.php"
Expand Down
2 changes: 1 addition & 1 deletion src/MagicAccessors.php
Expand Up @@ -6,7 +6,7 @@
* For the full copyright and license information, please view the file license.txt that was distributed with this source code.
*/

namespace Kdyby\DoctrineMagicAccessors;
namespace Kdyby\Doctrine\MagicAccessors;

use Doctrine\Common\Collections\Collection;
use Kdyby\Doctrine\Collections\Readonly\ReadOnlyCollectionWrapper;
Expand Down
2 changes: 1 addition & 1 deletion src/exceptions.php
Expand Up @@ -8,7 +8,7 @@
* For the full copyright and license information, please view the file license.txt that was distributed with this source code.
*/

namespace Kdyby\DoctrineMagicAccessors;
namespace Kdyby\Doctrine\MagicAccessors;

interface Exception
{
Expand Down
44 changes: 22 additions & 22 deletions tests/MagicAccesors.phpt
Expand Up @@ -4,7 +4,7 @@
* @testCase
*/

namespace KdybyTests\DoctrineMagicAccessors;
namespace KdybyTests\Doctrine\MagicAccessors;

use Tester;
use Tester\Assert;
Expand All @@ -24,7 +24,7 @@ class MagicAccessorsTest extends Tester\TestCase
Assert::exception(function () {
$entity = new BadlyNamedEntity();
unset($entity->one);
}, 'Kdyby\DoctrineMagicAccessors\MemberAccessException', 'Cannot unset the property KdybyTests\DoctrineMagicAccessors\BadlyNamedEntity::$one.');
}, 'Kdyby\Doctrine\MagicAccessors\MemberAccessException', 'Cannot unset the property KdybyTests\Doctrine\MagicAccessors\BadlyNamedEntity::$one.');
}


Expand All @@ -34,7 +34,7 @@ class MagicAccessorsTest extends Tester\TestCase
Assert::exception(function () {
$entity = new BadlyNamedEntity();
unset($entity->two);
}, 'Kdyby\DoctrineMagicAccessors\MemberAccessException', 'Cannot unset the property KdybyTests\DoctrineMagicAccessors\BadlyNamedEntity::$two.');
}, 'Kdyby\Doctrine\MagicAccessors\MemberAccessException', 'Cannot unset the property KdybyTests\Doctrine\MagicAccessors\BadlyNamedEntity::$two.');
}


Expand All @@ -58,7 +58,7 @@ class MagicAccessorsTest extends Tester\TestCase
Assert::exception(function () {
$entity = new BadlyNamedEntity();
$entity->one;
}, 'Kdyby\DoctrineMagicAccessors\MemberAccessException', 'Cannot read an undeclared property KdybyTests\DoctrineMagicAccessors\BadlyNamedEntity::$one.');
}, 'Kdyby\Doctrine\MagicAccessors\MemberAccessException', 'Cannot read an undeclared property KdybyTests\Doctrine\MagicAccessors\BadlyNamedEntity::$one.');
}


Expand All @@ -76,7 +76,7 @@ class MagicAccessorsTest extends Tester\TestCase
Assert::exception(function () {
$entity = new BadlyNamedEntity();
$entity->ones;
}, 'Kdyby\DoctrineMagicAccessors\MemberAccessException', 'Cannot read an undeclared property KdybyTests\DoctrineMagicAccessors\BadlyNamedEntity::$ones.');
}, 'Kdyby\Doctrine\MagicAccessors\MemberAccessException', 'Cannot read an undeclared property KdybyTests\Doctrine\MagicAccessors\BadlyNamedEntity::$ones.');
}


Expand All @@ -101,7 +101,7 @@ class MagicAccessorsTest extends Tester\TestCase
Assert::exception(function () {
$entity = new BadlyNamedEntity();
$entity->one = 1;
}, 'Kdyby\DoctrineMagicAccessors\MemberAccessException', 'Cannot write to an undeclared property KdybyTests\DoctrineMagicAccessors\BadlyNamedEntity::$one.');
}, 'Kdyby\Doctrine\MagicAccessors\MemberAccessException', 'Cannot write to an undeclared property KdybyTests\Doctrine\MagicAccessors\BadlyNamedEntity::$one.');
}


Expand All @@ -120,7 +120,7 @@ class MagicAccessorsTest extends Tester\TestCase
Assert::exception(function () {
$entity = new BadlyNamedEntity();
$entity->ones = 1;
}, 'Kdyby\DoctrineMagicAccessors\MemberAccessException', 'Cannot write to an undeclared property KdybyTests\DoctrineMagicAccessors\BadlyNamedEntity::$ones.');
}, 'Kdyby\Doctrine\MagicAccessors\MemberAccessException', 'Cannot write to an undeclared property KdybyTests\Doctrine\MagicAccessors\BadlyNamedEntity::$ones.');
}


Expand All @@ -130,7 +130,7 @@ class MagicAccessorsTest extends Tester\TestCase
Assert::exception(function () {
$entity = new BadlyNamedEntity();
$entity->twos = 1;
}, 'Kdyby\DoctrineMagicAccessors\UnexpectedValueException', 'Class property KdybyTests\DoctrineMagicAccessors\BadlyNamedEntity::$twos is an instance of Doctrine\Common\Collections\Collection. Use add<property>() and remove<property>() methods to manipulate it or declare your own.');
}, 'Kdyby\Doctrine\MagicAccessors\UnexpectedValueException', 'Class property KdybyTests\Doctrine\MagicAccessors\BadlyNamedEntity::$twos is an instance of Doctrine\Common\Collections\Collection. Use add<property>() and remove<property>() methods to manipulate it or declare your own.');
}


Expand All @@ -140,7 +140,7 @@ class MagicAccessorsTest extends Tester\TestCase
Assert::exception(function () {
$entity = new BadlyNamedEntity();
$entity->proxies = 1;
}, 'Kdyby\DoctrineMagicAccessors\UnexpectedValueException', 'Class property KdybyTests\DoctrineMagicAccessors\BadlyNamedEntity::$proxies is an instance of Doctrine\Common\Collections\Collection. Use add<property>() and remove<property>() methods to manipulate it or declare your own.');
}, 'Kdyby\Doctrine\MagicAccessors\UnexpectedValueException', 'Class property KdybyTests\Doctrine\MagicAccessors\BadlyNamedEntity::$proxies is an instance of Doctrine\Common\Collections\Collection. Use add<property>() and remove<property>() methods to manipulate it or declare your own.');
}


Expand All @@ -150,7 +150,7 @@ class MagicAccessorsTest extends Tester\TestCase
Assert::exception(function () {
$entity = new BadlyNamedEntity();
$entity->setOne(1);
}, 'Kdyby\DoctrineMagicAccessors\MemberAccessException', 'Call to undefined method KdybyTests\DoctrineMagicAccessors\BadlyNamedEntity::setOne().');
}, 'Kdyby\Doctrine\MagicAccessors\MemberAccessException', 'Call to undefined method KdybyTests\Doctrine\MagicAccessors\BadlyNamedEntity::setOne().');
}


Expand All @@ -177,7 +177,7 @@ class MagicAccessorsTest extends Tester\TestCase
Assert::exception(function () {
$entity = new BadlyNamedEntity();
$entity->setOnes(1);
}, 'Kdyby\DoctrineMagicAccessors\MemberAccessException', 'Call to undefined method KdybyTests\DoctrineMagicAccessors\BadlyNamedEntity::setOnes().');
}, 'Kdyby\Doctrine\MagicAccessors\MemberAccessException', 'Call to undefined method KdybyTests\Doctrine\MagicAccessors\BadlyNamedEntity::setOnes().');
}


Expand All @@ -187,7 +187,7 @@ class MagicAccessorsTest extends Tester\TestCase
Assert::exception(function () {
$entity = new BadlyNamedEntity();
$entity->setTwos(2);
}, 'Kdyby\DoctrineMagicAccessors\UnexpectedValueException', 'Class property KdybyTests\DoctrineMagicAccessors\BadlyNamedEntity::$twos is an instance of Doctrine\Common\Collections\Collection. Use add<property>() and remove<property>() methods to manipulate it or declare your own.');
}, 'Kdyby\Doctrine\MagicAccessors\UnexpectedValueException', 'Class property KdybyTests\Doctrine\MagicAccessors\BadlyNamedEntity::$twos is an instance of Doctrine\Common\Collections\Collection. Use add<property>() and remove<property>() methods to manipulate it or declare your own.');
}


Expand All @@ -197,7 +197,7 @@ class MagicAccessorsTest extends Tester\TestCase
Assert::exception(function () {
$entity = new BadlyNamedEntity();
$entity->setProxies(3);
}, 'Kdyby\DoctrineMagicAccessors\UnexpectedValueException', 'Class property KdybyTests\DoctrineMagicAccessors\BadlyNamedEntity::$proxies is an instance of Doctrine\Common\Collections\Collection. Use add<property>() and remove<property>() methods to manipulate it or declare your own.');
}, 'Kdyby\Doctrine\MagicAccessors\UnexpectedValueException', 'Class property KdybyTests\Doctrine\MagicAccessors\BadlyNamedEntity::$proxies is an instance of Doctrine\Common\Collections\Collection. Use add<property>() and remove<property>() methods to manipulate it or declare your own.');
}


Expand All @@ -207,7 +207,7 @@ class MagicAccessorsTest extends Tester\TestCase
Assert::exception(function () {
$entity = new BadlyNamedEntity();
$entity->getOne();
}, 'Kdyby\DoctrineMagicAccessors\MemberAccessException', 'Call to undefined method KdybyTests\DoctrineMagicAccessors\BadlyNamedEntity::getOne().');
}, 'Kdyby\Doctrine\MagicAccessors\MemberAccessException', 'Call to undefined method KdybyTests\Doctrine\MagicAccessors\BadlyNamedEntity::getOne().');
}


Expand All @@ -225,7 +225,7 @@ class MagicAccessorsTest extends Tester\TestCase
Assert::exception(function () {
$entity = new BadlyNamedEntity();
$entity->getOnes();
}, 'Kdyby\DoctrineMagicAccessors\MemberAccessException', 'Call to undefined method KdybyTests\DoctrineMagicAccessors\BadlyNamedEntity::getOnes().');
}, 'Kdyby\Doctrine\MagicAccessors\MemberAccessException', 'Call to undefined method KdybyTests\Doctrine\MagicAccessors\BadlyNamedEntity::getOnes().');
}


Expand All @@ -244,7 +244,7 @@ class MagicAccessorsTest extends Tester\TestCase
Assert::exception(function () {
$entity = new BadlyNamedEntity();
$entity->thousand(1000);
}, 'Kdyby\DoctrineMagicAccessors\MemberAccessException', 'Call to undefined method KdybyTests\DoctrineMagicAccessors\BadlyNamedEntity::thousand().');
}, 'Kdyby\Doctrine\MagicAccessors\MemberAccessException', 'Call to undefined method KdybyTests\Doctrine\MagicAccessors\BadlyNamedEntity::thousand().');
}


Expand All @@ -254,7 +254,7 @@ class MagicAccessorsTest extends Tester\TestCase
Assert::exception(function () {
$entity = new BadlyNamedEntity();
$entity->addOne((object) ['id' => 1]);
}, 'Kdyby\DoctrineMagicAccessors\MemberAccessException', 'Call to undefined method KdybyTests\DoctrineMagicAccessors\BadlyNamedEntity::addOne().');
}, 'Kdyby\Doctrine\MagicAccessors\MemberAccessException', 'Call to undefined method KdybyTests\Doctrine\MagicAccessors\BadlyNamedEntity::addOne().');
}


Expand All @@ -264,7 +264,7 @@ class MagicAccessorsTest extends Tester\TestCase
Assert::exception(function () {
$entity = new BadlyNamedEntity();
$entity->addFour((object) ['id' => 4]);
}, 'Kdyby\DoctrineMagicAccessors\UnexpectedValueException', 'Class property KdybyTests\DoctrineMagicAccessors\BadlyNamedEntity::$four is not an instance of Doctrine\Common\Collections\Collection.');
}, 'Kdyby\Doctrine\MagicAccessors\UnexpectedValueException', 'Class property KdybyTests\Doctrine\MagicAccessors\BadlyNamedEntity::$four is not an instance of Doctrine\Common\Collections\Collection.');
}


Expand All @@ -290,7 +290,7 @@ class MagicAccessorsTest extends Tester\TestCase
Assert::exception(function () {
$entity = new BadlyNamedEntity();
$entity->hasOne((object) ['id' => 1]);
}, 'Kdyby\DoctrineMagicAccessors\MemberAccessException', 'Call to undefined method KdybyTests\DoctrineMagicAccessors\BadlyNamedEntity::hasOne().');
}, 'Kdyby\Doctrine\MagicAccessors\MemberAccessException', 'Call to undefined method KdybyTests\Doctrine\MagicAccessors\BadlyNamedEntity::hasOne().');
}


Expand All @@ -300,7 +300,7 @@ class MagicAccessorsTest extends Tester\TestCase
Assert::exception(function () {
$entity = new BadlyNamedEntity();
$entity->hasFour((object) ['id' => 4]);
}, 'Kdyby\DoctrineMagicAccessors\UnexpectedValueException', 'Class property KdybyTests\DoctrineMagicAccessors\BadlyNamedEntity::$four is not an instance of Doctrine\Common\Collections\Collection.');
}, 'Kdyby\Doctrine\MagicAccessors\UnexpectedValueException', 'Class property KdybyTests\Doctrine\MagicAccessors\BadlyNamedEntity::$four is not an instance of Doctrine\Common\Collections\Collection.');
}


Expand All @@ -327,7 +327,7 @@ class MagicAccessorsTest extends Tester\TestCase
Assert::exception(function () {
$entity = new BadlyNamedEntity();
$entity->removeOne((object) ['id' => 1]);
}, 'Kdyby\DoctrineMagicAccessors\MemberAccessException', 'Call to undefined method KdybyTests\DoctrineMagicAccessors\BadlyNamedEntity::removeOne().');
}, 'Kdyby\Doctrine\MagicAccessors\MemberAccessException', 'Call to undefined method KdybyTests\Doctrine\MagicAccessors\BadlyNamedEntity::removeOne().');
}


Expand All @@ -337,7 +337,7 @@ class MagicAccessorsTest extends Tester\TestCase
Assert::exception(function () {
$entity = new BadlyNamedEntity();
$entity->removeFour((object) ['id' => 4]);
}, 'Kdyby\DoctrineMagicAccessors\UnexpectedValueException', 'Class property KdybyTests\DoctrineMagicAccessors\BadlyNamedEntity::$four is not an instance of Doctrine\Common\Collections\Collection.');
}, 'Kdyby\Doctrine\MagicAccessors\UnexpectedValueException', 'Class property KdybyTests\Doctrine\MagicAccessors\BadlyNamedEntity::$four is not an instance of Doctrine\Common\Collections\Collection.');
}


Expand Down
4 changes: 2 additions & 2 deletions tests/mocks/BadlyNamedEntity.php
Expand Up @@ -8,7 +8,7 @@
* For the full copyright and license information, please view the file license.txt that was distributed with this source code.
*/

namespace KdybyTests\DoctrineMagicAccessors;
namespace KdybyTests\Doctrine\MagicAccessors;

use Doctrine\Common\Collections\ArrayCollection;
use Kdyby;
Expand All @@ -32,7 +32,7 @@
class BadlyNamedEntity
{

use Kdyby\DoctrineMagicAccessors\MagicAccessors;
use Kdyby\Doctrine\MagicAccessors\MagicAccessors;

/**
* @var array events
Expand Down

0 comments on commit da26e4a

Please sign in to comment.