8000 [Workflow] CS tweaks by ro0NL · Pull Request #19187 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Workflow] CS tweaks #19187

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

8000
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixed tests
  • Loading branch information
ro0NL committed Jun 26, 2016
commit 7bbf948d2499c0d5dfa5a0259cd3f9bbc3ea81d6
6 changes: 3 additions & 3 deletions src/Symfony/Component/Workflow/Tests/DefinitionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function testSetInitialPlace()
}

/**
* @expectedException Symfony\Component\Workflow\Exception\LogicException
* @expectedException \Symfony\Component\Workflow\Exception\LogicException
* @expectedExceptionMessage Place "d" cannot be the initial place as it does not exist.
*/
public function testSetInitialPlaceAndPlaceIsNotDefined()
Expand All @@ -50,7 +50,7 @@ public function testAddTransition()
}

/**
* @expectedException Symfony\Component\Workflow\Exception\LogicException
* @expectedException \Symfony\Component\Workflow\Exception\LogicException
* @expectedExceptionMessage Place "c" referenced in transition "name" does not exist.
*/
public function testAddTransitionAndFromPlaceIsNotDefined()
Expand All @@ -61,7 +61,7 @@ public function testAddTransitionAndFromPlaceIsNotDefined()
}

/**
* @expectedException Symfony\Component\Workflow\Exception\LogicException
* @expectedException \Symfony\Component\Workflow\Exception\LogicException
* @expectedExceptionMessage Place "c" referenced in transition "name" does not exist.
*/
public function testAddTransitionAndToPlaceIsNotDefined()
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/Workflow/Tests/RegistryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public function testGetWithSuccess()
}

/**
* @expectedException Symfony\Component\Workflow\Exception\InvalidArgumentE 8000 xception
* @expectedException \Symfony\Component\Workflow\Exception\InvalidArgumentException
* @expectedExceptionMessage At least two workflows match this subject. Set a different name on each and use the second (name) argument of this method.
*/
public function testGetWithMultipleMatch()
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/Workflow/Tests/TransitionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
class TransitionTest extends \PHPUnit_Framework_TestCase
{
/**
* @expectedException Symfony\Component\Workflow\Exception\InvalidArgumentException
* @expectedException \Symfony\Component\Workflow\Exception\InvalidArgumentException
* @expectedExceptionMessage The transition "foo.bar" contains invalid characters.
*/
public function testValidateName()
Expand Down
24 changes: 5 additions & 19 deletions src/Symfony/Component/Workflow/Tests/WorkflowTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
use Symfony\Component\Workflow\Definition;
use Symfony\Component\Workflow\Event\GuardEvent;
use Symfony\Component\Workflow\Marking;
use Symfony\Component\Workflow\MarkingStore\MarkingStoreInterface;
use Symfony\Component\Workflow\MarkingStore\PropertyAccessorMarkingStore;
use Symfony\Component\Workflow\MarkingStore\ScalarMarkingStore;
use Symfony\Component\Workflow\Transition;
Expand All @@ -15,7 +14,7 @@
class WorkflowTest extends \PHPUnit_Framework_TestCase
{
/**
* @expectedException Symfony\Component\Workflow\Exception\LogicException
* @expectedException \Symfony\Component\Workflow\Exception\LogicException
* @expectedExceptionMessage The marking store (Symfony\Component\Workflow\MarkingStore\ScalarMarkingStore) of workflow "unnamed" can not store many places. But the transition "t1" has too many output (2). Only one is accepted.
*/
public function testConstructorWithUniqueTransitionOutputInterfaceAndComplexWorkflow()
Expand All @@ -35,20 +34,7 @@ public function testConstructorWithUniqueTransitionOutputInterfaceAndSimpleWorkf
}

/**
* @expectedException Symfony\Component\Workflow\Exception\LogicException
* @expectedExceptionMessage The value returned by the MarkingStore is not an instance of "Symfony\Component\Workflow\Marking" for workflow "unnamed".
*/
public function testGetMarkingWithInvalidStoreReturn()
{
$subject = new \stdClass();
$subject->marking = null;
$workflow = new Workflow(new Definition(), $this->getMock(MarkingStoreInterface::class));

$workflow->getMarking($subject);
}

/**
* @expectedException Symfony\Component\Workflow\Exception\LogicException
* @expectedException \Symfony\Component\Workflow\Exception\LogicException
* @expectedExceptionMessage The Marking is empty and there is no initial place for workflow "unnamed".
*/
public function testGetMarkingWithEmptyDefinition()
Expand All @@ -61,7 +47,7 @@ public function testGetMarkingWithEmptyDefinition()
}

/**
* @expectedException Symfony\Component\Workflow\Exception\LogicException
* @expectedException \Symfony\Component\Workflow\Exception\LogicException
* @expectedExceptionMessage Place "nope" is not valid for workflow "unnamed".
*/
public function testGetMarkingWithImpossiblePlace()
Expand Down Expand Up @@ -104,7 +90,7 @@ public function testGetMarkingWithExistingMarking()
}

/**
* @expectedException Symfony\Component\Workflow\Exception\LogicException
* @expectedException \Symfony\Component\Workflow\Exception\LogicException
* @expectedExceptionMessage Transition "foobar" does not exist for workflow "unnamed".
*/
public function testCanWithUnexistingTransition()
Expand Down Expand Up @@ -141,7 +127,7 @@ public function testCanWithGuard()
}

/**
* @expectedException Symfony\Component\Workflow\Exception\LogicException
* @expectedException \Symfony\Component\Workflow\Exception\LogicException
* @expectedExceptionMessage Unable to apply transition "t2" for workflow "unnamed".
*/
public function testApplyWithImpossibleTransition()
Expand Down
0