Skip to content

Commit

Permalink
misc ns
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasVotruba committed Feb 9, 2015
1 parent 55ea3f3 commit fd3ae22
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 8 deletions.
3 changes: 2 additions & 1 deletion src/DI/LoggableExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
namespace Zenify\DoctrineBehaviors\DI;

use Kdyby;
use Kdyby\Events\DI\EventsExtension;
use Knp\DoctrineBehaviors\ORM\Loggable\LoggableSubscriber;
use Nette\Utils\AssertionException;
use Nette\Utils\Validators;
Expand Down Expand Up @@ -41,7 +42,7 @@ public function loadConfiguration()
'@' . $loggerCallable->getClass()
])
->setAutowired(FALSE)
->addTag(Kdyby\Events\DI\EventsExtension::TAG_SUBSCRIBER);
->addTag(EventsExtension::TAG_SUBSCRIBER);
}


Expand Down
3 changes: 2 additions & 1 deletion src/DI/SluggableExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
namespace Zenify\DoctrineBehaviors\DI;

use Kdyby;
use Kdyby\Events\DI\EventsExtension;
use Knp\DoctrineBehaviors\Model\Sluggable\Sluggable;
use Knp\DoctrineBehaviors\ORM\Sluggable\SluggableSubscriber;
use Nette\Utils\AssertionException;
Expand Down Expand Up @@ -39,7 +40,7 @@ public function loadConfiguration()
$config['trait']
])
->setAutowired(FALSE)
->addTag(Kdyby\Events\DI\EventsExtension::TAG_SUBSCRIBER);
->addTag(EventsExtension::TAG_SUBSCRIBER);
}


Expand Down
3 changes: 2 additions & 1 deletion src/DI/SoftDeletableExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
namespace Zenify\DoctrineBehaviors\DI;

use Kdyby;
use Kdyby\Events\DI\EventsExtension;
use Knp\DoctrineBehaviors\Model\SoftDeletable\SoftDeletable;
use Knp\DoctrineBehaviors\ORM\SoftDeletable\SoftDeletableSubscriber;
use Nette\Utils\AssertionException;
Expand Down Expand Up @@ -39,7 +40,7 @@ public function loadConfiguration()
$config['trait']
])
->setAutowired(FALSE)
->addTag(Kdyby\Events\DI\EventsExtension::TAG_SUBSCRIBER);
->addTag(EventsExtension::TAG_SUBSCRIBER);
}


Expand Down
3 changes: 2 additions & 1 deletion src/DI/TimestampableExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
namespace Zenify\DoctrineBehaviors\DI;

use Kdyby;
use Kdyby\Events\DI\EventsExtension;
use Knp\DoctrineBehaviors\Model\Timestampable\Timestampable;
use Knp\DoctrineBehaviors\ORM\Timestampable\TimestampableSubscriber;
use Nette\Utils\AssertionException;
Expand Down Expand Up @@ -39,7 +40,7 @@ public function loadConfiguration()
$config['trait']
])
->setAutowired(FALSE)
->addTag(Kdyby\Events\DI\EventsExtension::TAG_SUBSCRIBER);
->addTag(EventsExtension::TAG_SUBSCRIBER);
}


Expand Down
3 changes: 2 additions & 1 deletion src/DI/TranslatableExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
namespace Zenify\DoctrineBehaviors\DI;

use Kdyby;
use Kdyby\Events\DI\EventsExtension;
use Knp\DoctrineBehaviors\Model\Translatable\Translation;
use Knp\DoctrineBehaviors\ORM\Translatable\TranslatableSubscriber;
use Nette\Utils\AssertionException;
Expand Down Expand Up @@ -48,7 +49,7 @@ public function loadConfiguration()
$config['translationFetchMode']
])
->setAutowired(FALSE)
->addTag(Kdyby\Events\DI\EventsExtension::TAG_SUBSCRIBER);
->addTag(EventsExtension::TAG_SUBSCRIBER);
}


Expand Down
4 changes: 1 addition & 3 deletions src/Loggable/LoggerCallable.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,8 @@

namespace Zenify\DoctrineBehaviors\Loggable;

use Nette;


class LoggerCallable extends Nette\Object
class LoggerCallable
{

/**
Expand Down
34 changes: 34 additions & 0 deletions tests/bootstrap.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?php

namespace Zenify\DoctrineBehaviors\Tests;

use Nette\Configurator;
use Nette\DI\Container;


class ContainerFactory
{

/**
* @return Container
*/
public function create()
{
$configurator = new Configurator;
$configurator->setTempDirectory($this->createAndReturnTempDir());
$configurator->addConfig(__DIR__ . '/config/default.neon');
return $configurator->createContainer();
}


/**
* @return string
*/
private function createAndReturnTempDir()
{
$tempDir = __DIR__ . '/temp';
@mkdir($tempDir, 0777, TRUE);
return $tempDir;
}

}

0 comments on commit fd3ae22

Please sign in to comment.