Core and composer updates

This commit is contained in:
Rob Davies 2017-07-03 16:47:07 +01:00
parent a82634bb98
commit 62cac30480
1118 changed files with 21770 additions and 6306 deletions

View file

@ -170,11 +170,11 @@ class WorkflowUiTest extends BrowserTestBase {
// Ensure that weight changes the state ordering.
$workflow = $workflow_storage->loadUnchanged('test');
$this->assertEquals('published', $workflow->getInitialState()->id());
$this->assertEquals('published', $workflow->getTypePlugin()->getInitialState($workflow)->id());
$this->drupalGet('admin/config/workflow/workflows/manage/test');
$this->submitForm(['states[draft][weight]' => '-1'], 'Save');
$workflow = $workflow_storage->loadUnchanged('test');
$this->assertEquals('draft', $workflow->getInitialState()->id());
$this->assertEquals('draft', $workflow->getTypePlugin()->getInitialState($workflow)->id());
// This will take us to the list of workflows, so we need to edit the
// workflow again.

View file

@ -257,25 +257,6 @@ class WorkflowTest extends UnitTestCase {
$workflow->deleteState('draft');
}
/**
* @covers ::getInitialState
*/
public function testGetInitialState() {
$workflow = new Workflow(['id' => 'test', 'type' => 'test_type'], 'workflow');
// By default states are ordered in the order added.
$workflow
->addState('draft', 'Draft')
->addState('published', 'Published')
->addState('archived', 'Archived');
$this->assertEquals('draft', $workflow->getInitialState()->id());
// Make published the first state.
$workflow->setStateWeight('published', -1);
$this->assertEquals('published', $workflow->getInitialState()->id());
}
/**
* @covers ::addTransition
* @covers ::hasTransition