Skip to content

Commit

Permalink
Updated to new factory version
Browse files Browse the repository at this point in the history
  • Loading branch information
rtens committed May 12, 2015
1 parent dbe7f40 commit 962938e
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 269 deletions.
109 changes: 0 additions & 109 deletions spec/watoki/scrut/specification/LoadDependenciesTest.php

This file was deleted.

70 changes: 0 additions & 70 deletions spec/watoki/scrut/specification/SpecificationFixture.php

This file was deleted.

74 changes: 0 additions & 74 deletions spec/watoki/scrut/specification/SpecificationTest.php

This file was deleted.

2 changes: 1 addition & 1 deletion src/watoki/scrut/FixtureProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function __construct(Specification $spec, Factory $factory) {

public function provide($class, array $args = array()) {
$instance = parent::provide($class, array('spec' => $this->spec));
$this->factory->setSingleton($class, $instance);
$this->factory->setSingleton($instance, $class);

$this->providedFixtures[] = $instance;

Expand Down
15 changes: 0 additions & 15 deletions src/watoki/scrut/Specification.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,21 +64,6 @@ protected function tearDown() {
}
}

public function runAllScenarios($prefix = 'test') {
$me = get_class($this);
$result = new \PHPUnit_Framework_TestResult();

foreach (get_class_methods($this) as $method) {
if (substr($method, 0, strlen($prefix)) == $prefix) {
/** @var Specification $spec */
$spec = new $me($method);
$spec->run($result);
}
}

return $result;
}

/**
* @param callable $do
*/
Expand Down

0 comments on commit 962938e

Please sign in to comment.