From 7c87e567e78a6744dafdc0d8cb20c2bc284dccf3 Mon Sep 17 00:00:00 2001 From: Andrea Marco Sartori <22cerbero22@gmail.com> Date: Tue, 26 Jul 2016 21:04:39 -0400 Subject: [PATCH] Applied fixes from StyleCI --- .../Workflow/Console/Drawing/DrawerSpec.php | 53 +- .../Workflow/Inflectors/InflectorSpec.php | 34 +- .../YamlPipelineRepositorySpec.php | 59 +- spec/Cerbero/Workflow/WorkflowSpec.php | 87 +- src/Console/Commands/AttachesPipesTrait.php | 194 +-- .../Commands/CreateWorkflowCommand.php | 245 +-- src/Console/Commands/DeleteIfForcedTrait.php | 44 +- .../Commands/DeleteWorkflowCommand.php | 142 +- src/Console/Commands/ReadWorkflowCommand.php | 135 +- .../Commands/UpdateWorkflowCommand.php | 186 ++- .../Commands/WorkflowGeneratorCommand.php | 131 +- src/Console/Drawing/Drawer.php | 582 +++---- src/Console/Drawing/Geometry.php | 640 +++---- src/Facades/Workflow.php | 26 +- src/Inflectors/Inflector.php | 151 +- src/Inflectors/InflectorInterface.php | 57 +- src/Pipes/AbstractPipe.php | 159 +- src/Pipes/PipeInterface.php | 31 +- .../PipelineRepositoryInterface.php | 135 +- src/Repositories/YamlPipelineRepository.php | 455 ++--- src/RunsWorkflow.php | 44 +- src/Workflow.php | 252 +-- src/WorkflowRunner.php | 27 +- src/WorkflowServiceProvider.php | 348 ++-- src/Wrappers/DispatcherInterface.php | 12 +- .../LaravelTraitNamespaceDetector.php | 34 +- src/Wrappers/MarshalDispatcher.php | 122 +- src/Wrappers/NamespaceDetectorInterface.php | 24 +- src/Wrappers/SymfonyYamlParser.php | 57 +- src/Wrappers/YamlParserInterface.php | 45 +- tests/_bootstrap.php | 1 + tests/_support/AcceptanceHelper.php | 2 +- tests/_support/AcceptanceTester.php | 7 +- tests/_support/FunctionalHelper.php | 582 ++++--- tests/_support/FunctionalTester.php | 7 +- tests/_support/UnitHelper.php | 2 +- tests/_support/UnitTester.php | 7 +- .../_generated/AcceptanceTesterActions.php | 635 ++++--- .../_generated/FunctionalTesterActions.php | 1467 +++++++++++------ .../_support/_generated/UnitTesterActions.php | 123 +- tests/acceptance/AcceptanceTester.php | 528 +++--- tests/acceptance/_bootstrap.php | 1 + ...dCreatedWorkflowIfAnotherOneExistsCept.php | 5 +- .../CreateUnguardedWorkflowCept.php | 5 +- .../CreateWorkflowWithManyPipesCept.php | 5 +- .../CreateWorkflowWithNoPipesCept.php | 5 +- ...eDetachedPipesDuringUpdateIfForcedCept.php | 5 +- .../DeleteWorkflowAndItsFilesCept.php | 5 +- .../DeleteWorkflowButSpareFilesCept.php | 5 +- ...isplayErrorIfWorkflowAlreadyExistsCept.php | 5 +- ...ErrorIfWorkflowNotExistsDuringReadCept.php | 5 +- ...rorIfWorkflowNotExistsDuringUpdateCept.php | 5 +- tests/functional/FunctionalTester.php | 1212 +++++++++----- .../ReadWorkflowWithManyPipesCept.php | 5 +- .../ReadWorkflowWithNoPipesCept.php | 5 +- .../ReadWorkflowWithOnePipeCept.php | 5 +- .../functional/UpdateExistingWorkflowCept.php | 5 +- tests/functional/_bootstrap.php | 1 + tests/unit/UnitTester.php | 94 +- tests/unit/_bootstrap.php | 1 + 60 files changed, 5285 insertions(+), 3966 deletions(-) diff --git a/spec/Cerbero/Workflow/Console/Drawing/DrawerSpec.php b/spec/Cerbero/Workflow/Console/Drawing/DrawerSpec.php index 0f4c7a3..a072a90 100644 --- a/spec/Cerbero/Workflow/Console/Drawing/DrawerSpec.php +++ b/spec/Cerbero/Workflow/Console/Drawing/DrawerSpec.php @@ -2,21 +2,20 @@ namespace spec\Cerbero\Workflow\Console\Drawing; -use PhpSpec\ObjectBehavior; -use Prophecy\Argument; -use Cerbero\Workflow\Repositories\PipelineRepositoryInterface; use Cerbero\Workflow\Console\Drawing\Geometry; +use Cerbero\Workflow\Repositories\PipelineRepositoryInterface; +use PhpSpec\ObjectBehavior; class DrawerSpec extends ObjectBehavior { - function let(PipelineRepositoryInterface $pipelines) - { - $geometry = new Geometry; + public function let(PipelineRepositoryInterface $pipelines) + { + $geometry = new Geometry(); - $this->beConstructedWith($pipelines, $geometry); - } + $this->beConstructedWith($pipelines, $geometry); + } - function it_is_initializable() + public function it_is_initializable() { $this->shouldHaveType('Cerbero\Workflow\Console\Drawing\Drawer'); } @@ -25,59 +24,63 @@ function it_is_initializable() * @testdox It draws a workflow with zero pipes. * * @author Andrea Marco Sartori - * @return void + * + * @return void */ public function it_draws_a_workflow_with_zero_pipes($pipelines) { - $pipelines->getPipesByPipeline('RegisterUser')->willReturn([]); + $pipelines->getPipesByPipeline('RegisterUser')->willReturn([]); - $drawing = file_get_contents(__DIR__ . '/stubs/zero.stub'); + $drawing = file_get_contents(__DIR__.'/stubs/zero.stub'); - $this->draw('RegisterUser')->shouldReturn($drawing); + $this->draw('RegisterUser')->shouldReturn($drawing); } /** * @testdox It draws a workflow with one pipe. * * @author Andrea Marco Sartori - * @return void + * + * @return void */ public function it_draws_a_workflow_with_one_pipe($pipelines) { - $pipelines->getPipesByPipeline('RegisterUser')->willReturn(['App\Workflows\RegisterUser\Notifier']); + $pipelines->getPipesByPipeline('RegisterUser')->willReturn(['App\Workflows\RegisterUser\Notifier']); - $drawing = file_get_contents(__DIR__ . '/stubs/one.stub'); + $drawing = file_get_contents(__DIR__.'/stubs/one.stub'); - $this->draw('RegisterUser')->shouldReturn($drawing); + $this->draw('RegisterUser')->shouldReturn($drawing); } /** * @testdox It draws a workflow with two pipe. * * @author Andrea Marco Sartori - * @return void + * + * @return void */ public function it_draws_a_workflow_with_two_pipe($pipelines) { - $pipelines->getPipesByPipeline('RegisterUser')->willReturn(['App\Workflows\RegisterUser\Logger', 'App\Workflows\RegisterUser\Notifier']); + $pipelines->getPipesByPipeline('RegisterUser')->willReturn(['App\Workflows\RegisterUser\Logger', 'App\Workflows\RegisterUser\Notifier']); - $drawing = file_get_contents(__DIR__ . '/stubs/two.stub'); + $drawing = file_get_contents(__DIR__.'/stubs/two.stub'); - $this->draw('RegisterUser')->shouldReturn($drawing); + $this->draw('RegisterUser')->shouldReturn($drawing); } /** * @testdox It draws a workflow with many pipes. * * @author Andrea Marco Sartori - * @return void + * + * @return void */ public function it_draws_a_workflow_with_many_pipes($pipelines) { - $pipelines->getPipesByPipeline('LoginUser')->willReturn(['LongName', 'TheLongestNameEver', 'LongerName', 'Name', 'VeryLongName']); + $pipelines->getPipesByPipeline('LoginUser')->willReturn(['LongName', 'TheLongestNameEver', 'LongerName', 'Name', 'VeryLongName']); - $drawing = file_get_contents(__DIR__ . '/stubs/many.stub'); + $drawing = file_get_contents(__DIR__.'/stubs/many.stub'); - $this->draw('LoginUser')->shouldReturn($drawing); + $this->draw('LoginUser')->shouldReturn($drawing); } } diff --git a/spec/Cerbero/Workflow/Inflectors/InflectorSpec.php b/spec/Cerbero/Workflow/Inflectors/InflectorSpec.php index 41662aa..5dcfb78 100644 --- a/spec/Cerbero/Workflow/Inflectors/InflectorSpec.php +++ b/spec/Cerbero/Workflow/Inflectors/InflectorSpec.php @@ -2,20 +2,19 @@ namespace spec\Cerbero\Workflow\Inflectors; -use PhpSpec\ObjectBehavior; -use Prophecy\Argument; use Cerbero\Workflow\Wrappers\NamespaceDetectorInterface; +use PhpSpec\ObjectBehavior; class InflectorSpec extends ObjectBehavior { - function let(NamespaceDetectorInterface $detector) - { - $this->beConstructedWith($detector); + public function let(NamespaceDetectorInterface $detector) + { + $this->beConstructedWith($detector); - $detector->detect()->willReturn('App'); - } + $detector->detect()->willReturn('App'); + } - function it_is_initializable() + public function it_is_initializable() { $this->shouldHaveType('Cerbero\Workflow\Inflectors\Inflector'); $this->shouldHaveType('Cerbero\Workflow\Inflectors\InflectorInterface'); @@ -25,36 +24,39 @@ function it_is_initializable() * @testdox It returns itself after setting the word to inflect. * * @author Andrea Marco Sartori - * @return void + * + * @return void */ public function it_returns_itself_after_setting_the_word_to_inflect() { - $this->of('foo')->shouldReturn($this); + $this->of('foo')->shouldReturn($this); } /** * @testdox It inflects the request. * * @author Andrea Marco Sartori - * @return void + * + * @return void */ public function it_inflects_the_request() { - $expected = 'App\Http\Requests\RegisterUserRequest'; + $expected = 'App\Http\Requests\RegisterUserRequest'; - $this->of('registerUser')->getRequest()->shouldReturn($expected); + $this->of('registerUser')->getRequest()->shouldReturn($expected); } /** * @testdox It inflects the job. * * @author Andrea Marco Sartori - * @return void + * + * @return void */ public function it_inflects_the_job() { - $expected = 'App\Jobs\RegisterUserJob'; + $expected = 'App\Jobs\RegisterUserJob'; - $this->of('registerUser')->getJob()->shouldReturn($expected); + $this->of('registerUser')->getJob()->shouldReturn($expected); } } diff --git a/spec/Cerbero/Workflow/Repositories/YamlPipelineRepositorySpec.php b/spec/Cerbero/Workflow/Repositories/YamlPipelineRepositorySpec.php index 9480e81..afe1c8d 100644 --- a/spec/Cerbero/Workflow/Repositories/YamlPipelineRepositorySpec.php +++ b/spec/Cerbero/Workflow/Repositories/YamlPipelineRepositorySpec.php @@ -2,28 +2,27 @@ namespace spec\Cerbero\Workflow\Repositories; -use PhpSpec\ObjectBehavior; -use Prophecy\Argument; use Cerbero\Workflow\Wrappers\YamlParserInterface; use Illuminate\Filesystem\Filesystem; +use PhpSpec\ObjectBehavior; class YamlPipelineRepositorySpec extends ObjectBehavior { - /** * @author Andrea Marco Sartori - * @var array $pipeline Example of pipeline. + * + * @var array Example of pipeline. */ - private $pipeline = array('RegisterUser' => ['Notifier', 'Logger']); + private $pipeline = ['RegisterUser' => ['Notifier', 'Logger']]; - function let(YamlParserInterface $parser, Filesystem $files) - { - $this->beConstructedWith($parser, $files, 'path/to/workflows'); + public function let(YamlParserInterface $parser, Filesystem $files) + { + $this->beConstructedWith($parser, $files, 'path/to/workflows'); - $parser->parse('path/to/workflows/workflows.yml')->shouldBeCalled()->willReturn($this->pipeline); - } + $parser->parse('path/to/workflows/workflows.yml')->shouldBeCalled()->willReturn($this->pipeline); + } - function it_is_initializable() + public function it_is_initializable() { $this->shouldHaveType('Cerbero\Workflow\Repositories\YamlPipelineRepository'); $this->shouldHaveType('Cerbero\Workflow\Repositories\PipelineRepositoryInterface'); @@ -33,42 +32,46 @@ function it_is_initializable() * @testdox It returns false when a pipeline does not exist. * * @author Andrea Marco Sartori - * @return void + * + * @return void */ public function it_returns_false_when_a_pipeline_does_not_exist() { - $this->exists('unknownPipeline')->shouldReturn(false); + $this->exists('unknownPipeline')->shouldReturn(false); } /** * @testdox It returns true when a pipeline exists. * * @author Andrea Marco Sartori - * @return void + * + * @return void */ public function it_returns_true_when_a_pipeline_exists() { - $this->exists('RegisterUser')->shouldReturn(true); + $this->exists('RegisterUser')->shouldReturn(true); } /** * @testdox It returns the pipeline of a fiven workflow. * * @author Andrea Marco Sartori - * @return void + * + * @return void */ public function it_returns_the_pipeline_of_a_fiven_workflow() { - $expected = ['Notifier', 'Logger']; + $expected = ['Notifier', 'Logger']; - $this->getPipesByPipeline('registerUser')->shouldReturn($expected); + $this->getPipesByPipeline('registerUser')->shouldReturn($expected); } /** * @testdox It retrieves the source of the pipelines. * * @author Andrea Marco Sartori - * @return void + * + * @return void */ public function it_retrieves_the_source_of_the_pipelines() { @@ -79,7 +82,8 @@ public function it_retrieves_the_source_of_the_pipelines() * @testdox It creates the YAML file. * * @author Andrea Marco Sartori - * @return void + * + * @return void */ public function it_creates_the_YAML_file($files) { @@ -94,7 +98,8 @@ public function it_creates_the_YAML_file($files) * @testdox It stores the given pipeline and its pipes. * * @author Andrea Marco Sartori - * @return void + * + * @return void */ public function it_stores_the_given_pipeline_and_its_pipes($parser, $files) { @@ -109,7 +114,8 @@ public function it_stores_the_given_pipeline_and_its_pipes($parser, $files) * @testdox It updates an existing pipeline by attaching and detaching pipes. * * @author Andrea Marco Sartori - * @return void + * + * @return void */ public function it_updates_an_existing_pipeline_by_attaching_and_detaching_pipes($parser, $files) { @@ -126,7 +132,8 @@ public function it_updates_an_existing_pipeline_by_attaching_and_detaching_pipes * @testdox It does not attach if no attachments are specified. * * @author Andrea Marco Sartori - * @return void + * + * @return void */ public function it_does_not_attach_if_no_attachments_are_specified($parser, $files) { @@ -143,7 +150,8 @@ public function it_does_not_attach_if_no_attachments_are_specified($parser, $fil * @testdox It does not detach if no detachments are specified. * * @author Andrea Marco Sartori - * @return void + * + * @return void */ public function it_does_not_detach_if_no_detachments_are_specified($parser, $files) { @@ -160,7 +168,8 @@ public function it_does_not_detach_if_no_detachments_are_specified($parser, $fil * @testdox It destroys a pipeline. * * @author Andrea Marco Sartori - * @return void + * + * @return void */ public function it_destroys_a_pipeline($parser, $files) { diff --git a/spec/Cerbero/Workflow/WorkflowSpec.php b/spec/Cerbero/Workflow/WorkflowSpec.php index fb065c4..5be11f8 100644 --- a/spec/Cerbero/Workflow/WorkflowSpec.php +++ b/spec/Cerbero/Workflow/WorkflowSpec.php @@ -2,24 +2,23 @@ namespace spec\Cerbero\Workflow; -use PhpSpec\ObjectBehavior; -use Prophecy\Argument; -use Cerbero\Workflow\Repositories\PipelineRepositoryInterface; +use ArrayAccess; use Cerbero\Workflow\Inflectors\InflectorInterface; -use Illuminate\Contracts\Container\Container; +use Cerbero\Workflow\Repositories\PipelineRepositoryInterface; use Cerbero\Workflow\Wrappers\DispatcherInterface; -use ArrayAccess; - -class WorkflowSpec extends ObjectBehavior { +use Illuminate\Contracts\Container\Container; +use PhpSpec\ObjectBehavior; - public function let( - PipelineRepositoryInterface $pipelines, +class WorkflowSpec extends ObjectBehavior +{ + public function let( + PipelineRepositoryInterface $pipelines, InflectorInterface $inflector, Container $container, - DispatcherInterface $dispatcher - ) { - $this->beConstructedWith($pipelines, $inflector, $container, $dispatcher); - } + DispatcherInterface $dispatcher + ) { + $this->beConstructedWith($pipelines, $inflector, $container, $dispatcher); + } public function it_is_initializable() { @@ -30,30 +29,32 @@ public function it_is_initializable() * @testdox It throws an exception if a workflow does not exist. * * @author Andrea Marco Sartori - * @return void + * + * @return void */ public function it_throws_an_exception_if_a_workflow_does_not_exist($pipelines) { - $pipelines->exists('unknownWorkflow')->shouldBeCalled()->willReturn(false); + $pipelines->exists('unknownWorkflow')->shouldBeCalled()->willReturn(false); - $this->shouldThrow('BadFunctionCallException')->duringUnknownWorkflow(); + $this->shouldThrow('BadFunctionCallException')->duringUnknownWorkflow(); } /** * @testdox It resolves the proper request if existing. * * @author Andrea Marco Sartori - * @return void + * + * @return void */ public function it_resolves_the_proper_request_if_existing($pipelines, $container, Router $router, $inflector, $dispatcher, ExistingRequest $request) { - $pipelines->exists('registerUser')->willReturn(true); + $pipelines->exists('registerUser')->willReturn(true); - $inflector->of('registerUser')->shouldBeCalled(); + $inflector->of('registerUser')->shouldBeCalled(); - $inflector->getRequest()->willReturn('spec\Cerbero\Workflow\ExistingRequest'); + $inflector->getRequest()->willReturn('spec\Cerbero\Workflow\ExistingRequest'); - $container->make('spec\Cerbero\Workflow\ExistingRequest')->shouldBeCalled()->willReturn($request); + $container->make('spec\Cerbero\Workflow\ExistingRequest')->shouldBeCalled()->willReturn($request); $container->make('router')->willReturn($router); @@ -61,32 +62,33 @@ public function it_resolves_the_proper_request_if_existing($pipelines, $containe $router->parameters()->willReturn(['foo' => 'bar']); - $inflector->getJob()->willReturn('job'); + $inflector->getJob()->willReturn('job'); - $pipelines->getPipesByPipeline('registerUser')->willReturn(['pipe']); + $pipelines->getPipesByPipeline('registerUser')->willReturn(['pipe']); - $dispatcher->pipeThrough(['pipe'])->willReturn($dispatcher); + $dispatcher->pipeThrough(['pipe'])->willReturn($dispatcher); - $dispatcher->dispatchFrom('job', $request, ['foo' => 'bar'])->shouldBeCalled(); + $dispatcher->dispatchFrom('job', $request, ['foo' => 'bar'])->shouldBeCalled(); - $this->registerUser(); + $this->registerUser(); } /** * @testdox It dispatches a job through a pipeline from a default request. * * @author Andrea Marco Sartori - * @return void + * + * @return void */ public function it_dispatches_a_job_through_a_pipeline_from_a_default_request($pipelines, $container, Router $router, $inflector, $dispatcher, ArrayAccess $request) { - $pipelines->exists('registerUser')->willReturn(true); + $pipelines->exists('registerUser')->willReturn(true); - $inflector->of('registerUser')->shouldBeCalled(); + $inflector->of('registerUser')->shouldBeCalled(); - $inflector->getRequest()->willReturn('NotExistingRequest'); + $inflector->getRequest()->willReturn('NotExistingRequest'); - $container->make('Illuminate\Http\Request')->shouldBeCalled()->willReturn($request); + $container->make('Illuminate\Http\Request')->shouldBeCalled()->willReturn($request); $container->make('router')->willReturn($router); @@ -94,23 +96,26 @@ public function it_dispatches_a_job_through_a_pipeline_from_a_default_request($p $router->parameters()->willReturn(['foo' => 'bar']); - $inflector->getJob()->willReturn('job'); + $inflector->getJob()->willReturn('job'); - $pipelines->getPipesByPipeline('registerUser')->willReturn(['pipe']); + $pipelines->getPipesByPipeline('registerUser')->willReturn(['pipe']); - $dispatcher->pipeThrough(['pipe'])->willReturn($dispatcher); + $dispatcher->pipeThrough(['pipe'])->willReturn($dispatcher); - $dispatcher->dispatchFrom('job', $request, ['foo' => 'bar'])->shouldBeCalled(); + $dispatcher->dispatchFrom('job', $request, ['foo' => 'bar'])->shouldBeCalled(); - $this->registerUser('foo', 'bar'); + $this->registerUser('foo', 'bar'); } - } -abstract class ExistingRequest implements ArrayAccess {} +abstract class ExistingRequest implements ArrayAccess +{ +} + +interface Router +{ + public function current(); -interface Router { - function current(); - function parameters(); + public function parameters(); } diff --git a/src/Console/Commands/AttachesPipesTrait.php b/src/Console/Commands/AttachesPipesTrait.php index 029629e..dada8fa 100644 --- a/src/Console/Commands/AttachesPipesTrait.php +++ b/src/Console/Commands/AttachesPipesTrait.php @@ -1,100 +1,108 @@ -getPipesByOption('attach') as $pipe) - { - $this->currentPipe = $pipe; - - parent::fire(); - } - } - - /** - * Retrieve a list of pipes. - * - * @author Andrea Marco Sartori - * @param string $option - * @return array - */ - protected function getPipesByOption($option) - { - $pipes = $this->option($option); - - preg_match_all('/\w+/', $pipes, $matches); - - return array_map('ucfirst', $matches[0]); - } - - /** - * Get the default namespace for the class. - * - * @param string $rootNamespace - * @return string - */ - protected function getDefaultNamespace($rootNamespace) - { - $workflows = $this->getWorkflowsNamespace(); - - $pipeline = $this->getWorkflowName(); - - return "{$rootNamespace}\\{$workflows}\\{$pipeline}"; - } - - /** - * Retrieve the namespace of the workflows. - * - * @author Andrea Marco Sartori - * @return string - */ - protected function getWorkflowsNamespace() - { - $relative = ltrim(config('workflow.path'), app_path()); - - $chunks = array_map('ucfirst', explode('/', $relative)); - - return implode('\\', $chunks); - } - - /** - * Retrieve a list of pipes with their namespaces. - * - * @author Andrea Marco Sartori - * @param string $option - * @return array - */ - protected function getNamespacedPipesByOption($option) - { - return array_map([$this, 'parseName'], $this->getPipesByOption($option)); - } - - /** - * Get the desired class name from the input. - * - * @return string - */ - protected function getNameInput() - { - return $this->currentPipe; - } - +trait AttachesPipesTrait +{ + /** + * @author Andrea Marco Sartori + * + * @var string $currentPipe Pipe to generate. + */ + protected $currentPipe; + + /** + * Generate the specified pipes. + * + * @author Andrea Marco Sartori + * + * @return void + */ + protected function generatePipes() + { + foreach ($this->getPipesByOption('attach') as $pipe) { + $this->currentPipe = $pipe; + + parent::fire(); + } + } + + /** + * Retrieve a list of pipes. + * + * @author Andrea Marco Sartori + * + * @param string $option + * + * @return array + */ + protected function getPipesByOption($option) + { + $pipes = $this->option($option); + + preg_match_all('/\w+/', $pipes, $matches); + + return array_map('ucfirst', $matches[0]); + } + + /** + * Get the default namespace for the class. + * + * @param string $rootNamespace + * + * @return string + */ + protected function getDefaultNamespace($rootNamespace) + { + $workflows = $this->getWorkflowsNamespace(); + + $pipeline = $this->getWorkflowName(); + + return "{$rootNamespace}\\{$workflows}\\{$pipeline}"; + } + + /** + * Retrieve the namespace of the workflows. + * + * @author Andrea Marco Sartori + * + * @return string + */ + protected function getWorkflowsNamespace() + { + $relative = ltrim(config('workflow.path'), app_path()); + + $chunks = array_map('ucfirst', explode('/', $relative)); + + return implode('\\', $chunks); + } + + /** + * Retrieve a list of pipes with their namespaces. + * + * @author Andrea Marco Sartori + * + * @param string $option + * + * @return array + */ + protected function getNamespacedPipesByOption($option) + { + return array_map([$this, 'parseName'], $this->getPipesByOption($option)); + } + + /** + * Get the desired class name from the input. + * + * @return string + */ + protected function getNameInput() + { + return $this->currentPipe; + } } diff --git a/src/Console/Commands/CreateWorkflowCommand.php b/src/Console/Commands/CreateWorkflowCommand.php index 6317895..40b2997 100644 --- a/src/Console/Commands/CreateWorkflowCommand.php +++ b/src/Console/Commands/CreateWorkflowCommand.php @@ -1,125 +1,128 @@ -inflector->of($name = $this->getWorkflowName()); - - if($this->pipelines->exists($name)) - { - return $this->error("The workflow [$name] already exists."); - } - - $this->generateAllNeededFiles(); - - $this->pipelines->store($name, $this->getNamespacedPipesByOption('attach')); - - $this->info('Workflow created successfully.'); - } - - /** - * Generate all the needed files. - * - * @author Andrea Marco Sartori - * @return void - */ - protected function generateAllNeededFiles() - { - $this->settleRepositoryIfNotExists(); - - $this->generateJob(); - - $this->generateRequestIfGuarded(); - - $this->generatePipes(); - } - - /** - * Settle the pipeline repository if it does not exist. - * - * @author Andrea Marco Sartori - * @return void - */ - protected function settleRepositoryIfNotExists() - { - $source = $this->pipelines->getSource(); - - if( ! $this->files->exists($source)) - { - $this->pipelines->settle(); - } - } - - /** - * Create the job to handle. - * - * @author Andrea Marco Sartori - * @return void - */ - protected function generateJob() - { - $name = $this->inflector->getJob(); - - $this->call('make:job', compact('name')); - } - - /** - * Create the request if unguard is not set. - * - * @author Andrea Marco Sartori - * @return void - */ - protected function generateRequestIfGuarded() - { - if( ! $this->option('unguard')) - { - $name = $this->inflector->getRequest(); - - $this->call('make:request', compact('name')); - } - } - - /** - * Get the console command options. - * - * @return array - */ - protected function getOptions() - { - return [ - ['attach', '-a', InputOption::VALUE_OPTIONAL, 'The pipes to attach to the workflow.', null], - ['unguard', '-u', InputOption::VALUE_NONE, 'Do not make this workflow validate data.', null], - ]; - } +use Symfony\Component\Console\Input\InputOption; +class CreateWorkflowCommand extends WorkflowGeneratorCommand +{ + use AttachesPipesTrait; + + /** + * The console command name. + * + * @var string + */ + protected $name = 'workflow:create'; + + /** + * The console command description. + * + * @var string + */ + protected $description = 'Create a new workflow'; + + /** + * @author Andrea Marco Sartori + * + * @var string $type Type of class to generate. + */ + protected $type = 'Pipe'; + + /** + * Execute the console command. + * + * @return mixed + */ + public function fire() + { + $this->inflector->of($name = $this->getWorkflowName()); + + if ($this->pipelines->exists($name)) { + return $this->error("The workflow [$name] already exists."); + } + + $this->generateAllNeededFiles(); + + $this->pipelines->store($name, $this->getNamespacedPipesByOption('attach')); + + $this->info('Workflow created successfully.'); + } + + /** + * Generate all the needed files. + * + * @author Andrea Marco Sartori + * + * @return void + */ + protected function generateAllNeededFiles() + { + $this->settleRepositoryIfNotExists(); + + $this->generateJob(); + + $this->generateRequestIfGuarded(); + + $this->generatePipes(); + } + + /** + * Settle the pipeline repository if it does not exist. + * + * @author Andrea Marco Sartori + * + * @return void + */ + protected function settleRepositoryIfNotExists() + { + $source = $this->pipelines->getSource(); + + if (!$this->files->exists($source)) { + $this->pipelines->settle(); + } + } + + /** + * Create the job to handle. + * + * @author Andrea Marco Sartori + * + * @return void + */ + protected function generateJob() + { + $name = $this->inflector->getJob(); + + $this->call('make:job', compact('name')); + } + + /** + * Create the request if unguard is not set. + * + * @author Andrea Marco Sartori + * + * @return void + */ + protected function generateRequestIfGuarded() + { + if (!$this->option('unguard')) { + $name = $this->inflector->getRequest(); + + $this->call('make:request', compact('name')); + } + } + + /** + * Get the console command options. + * + * @return array + */ + protected function getOptions() + { + return [ + ['attach', '-a', InputOption::VALUE_OPTIONAL, 'The pipes to attach to the workflow.', null], + ['unguard', '-u', InputOption::VALUE_NONE, 'Do not make this workflow validate data.', null], + ]; + } } diff --git a/src/Console/Commands/DeleteIfForcedTrait.php b/src/Console/Commands/DeleteIfForcedTrait.php index 630209c..e0fe1b6 100644 --- a/src/Console/Commands/DeleteIfForcedTrait.php +++ b/src/Console/Commands/DeleteIfForcedTrait.php @@ -1,29 +1,31 @@ -option('force')) return; - - foreach ($files as $file) - { - if($this->files->exists($path = $this->getPath($file))) - { - $this->files->delete($path); - } - } - } +trait DeleteIfForcedTrait +{ + /** + * Delete the given files if force is set. + * + * @author Andrea Marco Sartori + * + * @return void + */ + protected function deleteIfForced(array $files) + { + if (!$this->option('force')) { + return; + } + foreach ($files as $file) { + if ($this->files->exists($path = $this->getPath($file))) { + $this->files->delete($path); + } + } + } } diff --git a/src/Console/Commands/DeleteWorkflowCommand.php b/src/Console/Commands/DeleteWorkflowCommand.php index babd7ae..16abcbf 100644 --- a/src/Console/Commands/DeleteWorkflowCommand.php +++ b/src/Console/Commands/DeleteWorkflowCommand.php @@ -1,74 +1,76 @@ -inflector->of($name = $this->getWorkflowName()); - - if( ! $this->pipelines->exists($name)) - { - return $this->error("The workflow [$name] does not exist."); - } - - $this->deleteAllFilesOfWorkflowIfForced($name); +namespace Cerbero\Workflow\Console\Commands; - $this->pipelines->destroy($name); - - $this->info('Workflow deleted successfully.'); - } - - /** - * Delete all the generated files of the given workflow if forced. - * - * @author Andrea Marco Sartori - * @param string $workflow - * @return void - */ - protected function deleteAllFilesOfWorkflowIfForced($workflow) - { - $files = $this->pipelines->getPipesByPipeline($workflow); - - $files[] = $this->inflector->getRequest(); - - $files[] = $this->inflector->getJob(); - - $this->deleteIfForced($files); - } - - /** - * Get the console command options. - * - * @return array - */ - protected function getOptions() - { - return [ - ['force', '-f', InputOption::VALUE_NONE, 'Delete all the generated files of a workflow.'], - ]; - } +use Symfony\Component\Console\Input\InputOption; +class DeleteWorkflowCommand extends WorkflowGeneratorCommand +{ + use DeleteIfForcedTrait; + + /** + * The console command name. + * + * @var string + */ + protected $name = 'workflow:delete'; + + /** + * The console command description. + * + * @var string + */ + protected $description = 'Delete an existing workflow'; + + /** + * Execute the console command. + * + * @return mixed + */ + public function fire() + { + $this->inflector->of($name = $this->getWorkflowName()); + + if (!$this->pipelines->exists($name)) { + return $this->error("The workflow [$name] does not exist."); + } + + $this->deleteAllFilesOfWorkflowIfForced($name); + + $this->pipelines->destroy($name); + + $this->info('Workflow deleted successfully.'); + } + + /** + * Delete all the generated files of the given workflow if forced. + * + * @author Andrea Marco Sartori + * + * @param string $workflow + * + * @return void + */ + protected function deleteAllFilesOfWorkflowIfForced($workflow) + { + $files = $this->pipelines->getPipesByPipeline($workflow); + + $files[] = $this->inflector->getRequest(); + + $files[] = $this->inflector->getJob(); + + $this->deleteIfForced($files); + } + + /** + * Get the console command options. + * + * @return array + */ + protected function getOptions() + { + return [ + ['force', '-f', InputOption::VALUE_NONE, 'Delete all the generated files of a workflow.'], + ]; + } } diff --git a/src/Console/Commands/ReadWorkflowCommand.php b/src/Console/Commands/ReadWorkflowCommand.php index e8987e6..e5d31c6 100644 --- a/src/Console/Commands/ReadWorkflowCommand.php +++ b/src/Console/Commands/ReadWorkflowCommand.php @@ -1,81 +1,84 @@ -pipelines = $pipelines; + /** + * Set the dependencies. + * + * @param \Cerbero\Workflow\Repositories\PipelineRepositoryInterface $pipelines + * @param \Cerbero\Workflow\Console\Drawing\Drawer $drawer + * + * @return void + */ + public function __construct(PipelineRepositoryInterface $pipelines, Drawer $drawer) + { + parent::__construct(); - $this->drawer = $drawer; - } + $this->pipelines = $pipelines; - /** - * Execute the console command. - * - * @return mixed - */ - public function fire() - { - $workflow = ucfirst($this->argument('name')); + $this->drawer = $drawer; + } - if( ! $this->pipelines->exists($workflow)) - { - return $this->error("The workflow [$workflow] does not exist."); - } + /** + * Execute the console command. + * + * @return mixed + */ + public function fire() + { + $workflow = ucfirst($this->argument('name')); - $this->info($this->drawer->draw($workflow)); - } + if (!$this->pipelines->exists($workflow)) { + return $this->error("The workflow [$workflow] does not exist."); + } - /** - * Get the console command arguments. - * - * @return array - */ - protected function getArguments() - { - return [ - ['name', InputArgument::REQUIRED, 'The name of the workflow.'], - ]; - } + $this->info($this->drawer->draw($workflow)); + } + /** + * Get the console command arguments. + * + * @return array + */ + protected function getArguments() + { + return [ + ['name', InputArgument::REQUIRED, 'The name of the workflow.'], + ]; + } } diff --git a/src/Console/Commands/UpdateWorkflowCommand.php b/src/Console/Commands/UpdateWorkflowCommand.php index 7388800..7800a79 100644 --- a/src/Console/Commands/UpdateWorkflowCommand.php +++ b/src/Console/Commands/UpdateWorkflowCommand.php @@ -1,95 +1,99 @@ -getWorkflowName(); - - if( ! $this->pipelines->exists($name)) - { - return $this->error("The workflow [$name] does not exist."); - } - - $this->generatePipes(); - - $this->deleteDetachedIfForced(); - - $this->updateWorkflow($name); - - $this->info('Workflow updated successfully.'); - } - - /** - * Delete the detached pipes if force is set. - * - * @author Andrea Marco Sartori - * @return void - */ - protected function deleteDetachedIfForced() - { - $detachments = $this->getNamespacedPipesByOption('detach'); - - $this->deleteIfForced($detachments); - } - - /** - * Update the given workflow. - * - * @author Andrea Marco Sartori - * @param string $workflow - * @return void - */ - protected function updateWorkflow($workflow) - { - $attachments = $this->getNamespacedPipesByOption('attach'); - - $detachments = $this->getNamespacedPipesByOption('detach'); - - $this->pipelines->update($workflow, $attachments, $detachments); - } - - /** - * Get the console command options. - * - * @return array - */ - protected function getOptions() - { - return [ - ['attach', '-a', InputOption::VALUE_OPTIONAL, 'The pipes to attach to the workflow.', null], - ['detach', '-d', InputOption::VALUE_OPTIONAL, 'The pipes to detach from the workflow.', null], - ['force', '-f', InputOption::VALUE_NONE, 'Delete the files of detached pipes.'], - ]; - } +use Symfony\Component\Console\Input\InputOption; +class UpdateWorkflowCommand extends WorkflowGeneratorCommand +{ + use AttachesPipesTrait, DeleteIfForcedTrait; + + /** + * The console command name. + * + * @var string + */ + protected $name = 'workflow:update'; + + /** + * The console command description. + * + * @var string + */ + protected $description = 'Update an existing workflow'; + + /** + * @author Andrea Marco Sartori + * + * @var string $type Type of class to generate. + */ + protected $type = 'Pipe'; + + /** + * Execute the console command. + * + * @return mixed + */ + public function fire() + { + $name = $this->getWorkflowName(); + + if (!$this->pipelines->exists($name)) { + return $this->error("The workflow [$name] does not exist."); + } + + $this->generatePipes(); + + $this->deleteDetachedIfForced(); + + $this->updateWorkflow($name); + + $this->info('Workflow updated successfully.'); + } + + /** + * Delete the detached pipes if force is set. + * + * @author Andrea Marco Sartori + * + * @return void + */ + protected function deleteDetachedIfForced() + { + $detachments = $this->getNamespacedPipesByOption('detach'); + + $this->deleteIfForced($detachments); + } + + /** + * Update the given workflow. + * + * @author Andrea Marco Sartori + * + * @param string $workflow + * + * @return void + */ + protected function updateWorkflow($workflow) + { + $attachments = $this->getNamespacedPipesByOption('attach'); + + $detachments = $this->getNamespacedPipesByOption('detach'); + + $this->pipelines->update($workflow, $attachments, $detachments); + } + + /** + * Get the console command options. + * + * @return array + */ + protected function getOptions() + { + return [ + ['attach', '-a', InputOption::VALUE_OPTIONAL, 'The pipes to attach to the workflow.', null], + ['detach', '-d', InputOption::VALUE_OPTIONAL, 'The pipes to detach from the workflow.', null], + ['force', '-f', InputOption::VALUE_NONE, 'Delete the files of detached pipes.'], + ]; + } } diff --git a/src/Console/Commands/WorkflowGeneratorCommand.php b/src/Console/Commands/WorkflowGeneratorCommand.php index 716af02..bf90f8d 100644 --- a/src/Console/Commands/WorkflowGeneratorCommand.php +++ b/src/Console/Commands/WorkflowGeneratorCommand.php @@ -1,81 +1,86 @@ -pipelines = $pipelines; + /** + * Set the dependencies. + * + * @param \Illuminate\Filesystem\Filesystem $files + * + * @return void + */ + public function __construct( + Filesystem $files, + PipelineRepositoryInterface $pipelines, + InflectorInterface $inflector + ) { + parent::__construct($files); - $this->inflector = $inflector; - } + $this->pipelines = $pipelines; - /** - * Get the stub file for the generator. - * - * @return string - */ - protected function getStub() - { - return __DIR__ . '/../Stubs/pipe.stub'; - } + $this->inflector = $inflector; + } - /** - * Retrieve the name of the workflow. - * - * @author Andrea Marco Sartori - * @return string - */ - protected function getWorkflowName() - { - $name = $this->argument('name'); + /** + * Get the stub file for the generator. + * + * @return string + */ + protected function getStub() + { + return __DIR__.'/../Stubs/pipe.stub'; + } - return ucfirst($name); - } + /** + * Retrieve the name of the workflow. + * + * @author Andrea Marco Sartori + * + * @return string + */ + protected function getWorkflowName() + { + $name = $this->argument('name'); - /** - * Get the console command arguments. - * - * @return array - */ - protected function getArguments() - { - return [ - ['name', InputArgument::REQUIRED, 'The name of the workflow.'], - ]; - } + return ucfirst($name); + } + /** + * Get the console command arguments. + * + * @return array + */ + protected function getArguments() + { + return [ + ['name', InputArgument::REQUIRED, 'The name of the workflow.'], + ]; + } } diff --git a/src/Console/Drawing/Drawer.php b/src/Console/Drawing/Drawer.php index b7719c9..71ccaaa 100644 --- a/src/Console/Drawing/Drawer.php +++ b/src/Console/Drawing/Drawer.php @@ -1,4 +1,6 @@ -pipelines = $pipelines; - - $this->geometry = $geometry; - } - - /** - * Draw the given workflow. - * - * @author Andrea Marco Sartori - * @param string $workflow - * @return string - */ - public function draw($workflow) - { - $this->geometry->setCore($workflow); - - $this->setPipesOfWorkflow($workflow); - - $this->drawCenteredChar(static::NOCK); - - $this->drawPipesBeginning(); - - $this->drawCore(); - - $this->drawPipesEnd(); - - $this->drawCenteredChar(static::PILE); - - return $this->drawing; - } - - /** - * Set the pipes of the given workflow. - * - * @author Andrea Marco Sartori - * @param string $workflow - * @return void - */ - protected function setPipesOfWorkflow($workflow) - { - $pipes = $this->pipelines->getPipesByPipeline($workflow); - - $this->pipes = array_map(function($pipe) - { - $chunks = explode('\\', $pipe); - - return end($chunks); - - }, $pipes); - - $this->geometry->setPipes($this->pipes); - } - - /** - * Draw a character in the middle of the drawing. - * - * @author Andrea Marco Sartori - * @param string $character - * @return void - */ - protected function drawCenteredChar($character) - { - $spaces = str_repeat(' ', $this->geometry->getHalfWidth()); - - $this->drawRow($spaces . $character); - } - - /** - * Draw a row of the drawing. - * - * @author Andrea Marco Sartori - * @param string $row - * @return void - */ - protected function drawRow($row) - { - $this->drawing .= $row . PHP_EOL; - } - - /** - * Draw the beginning of all pipes. - * - * @author Andrea Marco Sartori - * @return void - */ - protected function drawPipesBeginning() - { - foreach ($this->pipes as $pipe) - { - $this->drawBorderTop(); - - $this->drawBordered( - $this->geometry->getSpacedPipe($pipe, static::NOCK, 'before()') - ); - } - } - - /** - * Draw content wrapped by borders. - * - * @author Andrea Marco Sartori - * @param string $content - * @return void - */ - protected function drawBordered($content) - { - $left = $this->geometry->getLeftBordersWith(static::BORDER_X); - - $right = $this->geometry->getRightBordersWith(static::BORDER_X); - - $this->drawRow($left.$content.$right); - } - - /** - * Draw the top border. - * - * @author Andrea Marco Sartori - * @param boolean $isCore - * @return void - */ - protected function drawBorderTop($isCore = false) - { - $crossroads = $isCore ? static::CROSSROADS_UP : static::CROSSROADS; - - $this->drawBorder(static::BORDER_NW, $crossroads, static::BORDER_NE); - - $this->geometry->increaseNesting(); - } - - /** - * Draw a border with the given bendings. - * - * @author Andrea Marco Sartori - * @param string $left - * @param string $middle - * @param string $right - * @return void - */ - protected function drawBorder($left, $middle, $right) - { - $width = $this->geometry->getWidthButBorders(); - - $border = str_repeat(static::BORDER_Y, $width); - - $this->replaceUtf8($border, $left, 0); - $this->replaceUtf8($border, $middle, floor($width / 2)); - $this->replaceUtf8($border, $right, $width - 1); - - $this->drawBordered($border); - } - - /** - * Replace a character in a given position of a string. - * - * @author Andrea Marco Sartori - * @param string $original - * @param string $replacement - * @param integer $position - * @return void - */ - private function replaceUtf8(&$original, $replacement, $position) - { - $start = mb_substr($original, 0, $position, "UTF-8"); - - $end = mb_substr($original, $position + 1, mb_strlen($original, 'UTF-8'), "UTF-8"); - - $original = $start . $replacement . $end; - } - - /** - * Draw the core of the workflow. - * - * @author Andrea Marco Sartori - * @return void - */ - protected function drawCore() - { - $this->drawBorderTop(true); - - $this->drawBordered($this->geometry->getSpacedCore()); - - $this->drawBorderBottom(true); - } - - /** - * Draw the bottom border. - * - * @author Andrea Marco Sartori - * @param boolean $isCore - * @return void - */ - protected function drawBorderBottom($isCore = false) - { - $this->geometry->decreaseNesting(); - - $crossroads = $isCore ? static::CROSSROADS_DOWN : static::CROSSROADS; - - $this->drawBorder(static::BORDER_SW, $crossroads, static::BORDER_SE); - } - - /** - * Draw the end of all pipes. - * - * @author Andrea Marco Sartori - * @return void - */ - protected function drawPipesEnd() - { - $pipes = array_reverse($this->pipes); - - foreach ($pipes as $pipe) - { - $this->drawBordered( - $this->geometry->getSpacedPipe($pipe, static::NOCK, 'after()') - ); - - $this->drawBorderBottom(); - } - } - +class Drawer +{ + const BORDER_X = '║'; + + const BORDER_Y = '═'; + + const BORDER_NW = '╔'; + + const BORDER_NE = '╗'; + + const BORDER_SE = '╝'; + + const BORDER_SW = '╚'; + + const NOCK = '║'; + + const PILE = '∇'; + + const CROSSROADS = '╬'; + + const CROSSROADS_UP = '╩'; + + const CROSSROADS_DOWN = '╦'; + + /** + * @author Andrea Marco Sartori + * + * @var Cerbero\Workflow\Repositories\PipelineRepositoryInterface $pipelines Pipeline repository. + */ + protected $pipelines; + + /** + * @author Andrea Marco Sartori + * + * @var Cerbero\Workflow\Console\Drawing\Geometry $geometry The applied geometry. + */ + protected $geometry; + + /** + * @author Andrea Marco Sartori + * + * @var array $pipes List of pipes. + */ + protected $pipes; + + /** + * @author Andrea Marco Sartori + * + * @var string $drawing The resulting drawing. + */ + protected $drawing = ''; + + /** + * Set the dependencies. + * + * @author Andrea Marco Sartori + * + * @param Cerbero\Workflow\Repositories\PipelineRepositoryInterface $pipelines + * @param Cerbero\Workflow\Console\Drawing\Geometry $geometry + * + * @return void + */ + public function __construct(PipelineRepositoryInterface $pipelines, Geometry $geometry) + { + $this->pipelines = $pipelines; + + $this->geometry = $geometry; + } + + /** + * Draw the given workflow. + * + * @author Andrea Marco Sartori + * + * @param string $workflow + * + * @return string + */ + public function draw($workflow) + { + $this->geometry->setCore($workflow); + + $this->setPipesOfWorkflow($workflow); + + $this->drawCenteredChar(static::NOCK); + + $this->drawPipesBeginning(); + + $this->drawCore(); + + $this->drawPipesEnd(); + + $this->drawCenteredChar(static::PILE); + + return $this->drawing; + } + + /** + * Set the pipes of the given workflow. + * + * @author Andrea Marco Sartori + * + * @param string $workflow + * + * @return void + */ + protected function setPipesOfWorkflow($workflow) + { + $pipes = $this->pipelines->getPipesByPipeline($workflow); + + $this->pipes = array_map(function ($pipe) { + $chunks = explode('\\', $pipe); + + return end($chunks); + }, $pipes); + + $this->geometry->setPipes($this->pipes); + } + + /** + * Draw a character in the middle of the drawing. + * + * @author Andrea Marco Sartori + * + * @param string $character + * + * @return void + */ + protected function drawCenteredChar($character) + { + $spaces = str_repeat(' ', $this->geometry->getHalfWidth()); + + $this->drawRow($spaces.$character); + } + + /** + * Draw a row of the drawing. + * + * @author Andrea Marco Sartori + * + * @param string $row + * + * @return void + */ + protected function drawRow($row) + { + $this->drawing .= $row.PHP_EOL; + } + + /** + * Draw the beginning of all pipes. + * + * @author Andrea Marco Sartori + * + * @return void + */ + protected function drawPipesBeginning() + { + foreach ($this->pipes as $pipe) { + $this->drawBorderTop(); + + $this->drawBordered( + $this->geometry->getSpacedPipe($pipe, static::NOCK, 'before()') + ); + } + } + + /** + * Draw content wrapped by borders. + * + * @author Andrea Marco Sartori + * + * @param string $content + * + * @return void + */ + protected function drawBordered($content) + { + $left = $this->geometry->getLeftBordersWith(static::BORDER_X); + + $right = $this->geometry->getRightBordersWith(static::BORDER_X); + + $this->drawRow($left.$content.$right); + } + + /** + * Draw the top border. + * + * @author Andrea Marco Sartori + * + * @param bool $isCore + * + * @return void + */ + protected function drawBorderTop($isCore = false) + { + $crossroads = $isCore ? static::CROSSROADS_UP : static::CROSSROADS; + + $this->drawBorder(static::BORDER_NW, $crossroads, static::BORDER_NE); + + $this->geometry->increaseNesting(); + } + + /** + * Draw a border with the given bendings. + * + * @author Andrea Marco Sartori + * + * @param string $left + * @param string $middle + * @param string $right + * + * @return void + */ + protected function drawBorder($left, $middle, $right) + { + $width = $this->geometry->getWidthButBorders(); + + $border = str_repeat(static::BORDER_Y, $width); + + $this->replaceUtf8($border, $left, 0); + $this->replaceUtf8($border, $middle, floor($width / 2)); + $this->replaceUtf8($border, $right, $width - 1); + + $this->drawBordered($border); + } + + /** + * Replace a character in a given position of a string. + * + * @author Andrea Marco Sartori + * + * @param string $original + * @param string $replacement + * @param int $position + * + * @return void + */ + private function replaceUtf8(&$original, $replacement, $position) + { + $start = mb_substr($original, 0, $position, 'UTF-8'); + + $end = mb_substr($original, $position + 1, mb_strlen($original, 'UTF-8'), 'UTF-8'); + + $original = $start.$replacement.$end; + } + + /** + * Draw the core of the workflow. + * + * @author Andrea Marco Sartori + * + * @return void + */ + protected function drawCore() + { + $this->drawBorderTop(true); + + $this->drawBordered($this->geometry->getSpacedCore()); + + $this->drawBorderBottom(true); + } + + /** + * Draw the bottom border. + * + * @author Andrea Marco Sartori + * + * @param bool $isCore + * + * @return void + */ + protected function drawBorderBottom($isCore = false) + { + $this->geometry->decreaseNesting(); + + $crossroads = $isCore ? static::CROSSROADS_DOWN : static::CROSSROADS; + + $this->drawBorder(static::BORDER_SW, $crossroads, static::BORDER_SE); + } + + /** + * Draw the end of all pipes. + * + * @author Andrea Marco Sartori + * + * @return void + */ + protected function drawPipesEnd() + { + $pipes = array_reverse($this->pipes); + + foreach ($pipes as $pipe) { + $this->drawBordered( + $this->geometry->getSpacedPipe($pipe, static::NOCK, 'after()') + ); + + $this->drawBorderBottom(); + } + } } diff --git a/src/Console/Drawing/Geometry.php b/src/Console/Drawing/Geometry.php index 053c9d6..ac2f131 100644 --- a/src/Console/Drawing/Geometry.php +++ b/src/Console/Drawing/Geometry.php @@ -1,311 +1,343 @@ -core = $core; - } - - /** - * Set the pipes. - * - * @author Andrea Marco Sartori - * @param array $pipes - * @return void - */ - public function setPipes(array $pipes) - { - $this->pipes = $pipes; - } - - /** - * Calculate the half width of the drawing. - * - * @author Andrea Marco Sartori - * @param boolean $up - * @return integer - */ - public function getHalfWidth($up = false) - { - $number = $this->getTotalWidth(); - - return $this->roundHalf($number, $up); - } - - /** - * Round the half of a number, either up or down. - * - * @author Andrea Marco Sartori - * @param integer $number - * @param boolean $up - * @return integer - */ - private function roundHalf($number, $up) - { - $round = $up ? 'ceil' : 'floor'; - - return $round($number / 2); - } - - /** - * Calculate the total width of the drawing. - * - * @author Andrea Marco Sartori - * @return integer - */ - protected function getTotalWidth() - { - $borders = (static::BORDER_WIDTH + static::MIN_SPACE_FROM_BORDER_X) * 2; - - if(empty($this->pipes)) - { - return $borders + $this->getCoreLength(); - } - - $borders *= count($this->pipes); - - $name = ($this->getLongestPipeLength() + static::SPACE_FROM_ARROW) * 2; - - return $borders + $name + static::ARROW_WIDTH; - } - - /** - * Calculate the length of the core name. - * - * @author Andrea Marco Sartori - * @return integer - */ - protected function getCoreLength() - { - return strlen($this->core); - } - - /** - * Calculate the length of the longest pipe name. - * - * @author Andrea Marco Sartori - * @return integer - */ - protected function getLongestPipeLength() - { - if(empty($this->pipes)) return 0; - - return array_reduce($this->pipes, function($carry, $pipe) - { - return strlen($pipe) > $carry ? strlen($pipe) : $carry; - - }, static::MIN_PIPE_LENGTH); - } - - /** - * Retrieve the spaced pipe and method pair. - * - * @author Andrea Marco Sartori - * @param string $pipe - * @param string $arrow - * @param string $method - * @return string - */ - public function getSpacedPipe($pipe, $arrow, $method) - { - $left = $this->getSpacesByWord($pipe); - - $arrow = $this->addSpacesToArrow($arrow); - - $right = $this->getSpacesByWord($method); - - return $left.$pipe.$arrow.$method.$right; - } - - /** - * Retrieve the blank spaces close to a word. - * - * @author Andrea Marco Sartori - * @param string $word - * @return string - */ - protected function getSpacesByWord($word) - { - $length = $this->getSideBordersLength() + static::SPACE_FROM_ARROW + static::ARROW_WIDTH; - - $extra = $this->getHalfWidth(true) - $length - strlen($word); - - return $extra > 0 ? str_repeat(' ', $extra) : ''; - } - - /** - * Retrieve the length of the borders of a side. - * - * @author Andrea Marco Sartori - * @return integer - */ - protected function getSideBordersLength() - { - $border = (static::BORDER_WIDTH + static::MIN_SPACE_FROM_BORDER_X); - - return $border * $this->nesting; - } - - /** - * Add spaces around the given arrow. - * - * @author Andrea Marco Sartori - * @param string $arrow - * @return string - */ - protected function addSpacesToArrow($arrow) - { - $spaces = str_repeat(' ', static::SPACE_FROM_ARROW); - - return "{$spaces}{$arrow}{$spaces}"; - } - - /** - * Retrieve the left borders formatted with the given border. - * - * @author Andrea Marco Sartori - * @param string $border - * @return string - */ - public function getLeftBordersWith($border) - { - $border = str_repeat($border, static::BORDER_WIDTH); - - $space = str_repeat(' ', static::MIN_SPACE_FROM_BORDER_X); - - return str_repeat("{$border}{$space}", $this->nesting); - } - - /** - * Retrieve the right borders formatted with the given border. - * - * @author Andrea Marco Sartori - * @param string $border - * @return string - */ - public function getRightBordersWith($border) - { - $space = str_repeat(' ', static::MIN_SPACE_FROM_BORDER_X); - - $border = str_repeat($border, static::BORDER_WIDTH); - - return str_repeat("{$space}{$border}", $this->nesting); - } - - /** - * Increase the nesting level. - * - * @author Andrea Marco Sartori - * @return void - */ - public function increaseNesting() - { - $this->nesting++; - } - - /** - * Calculate the width of the drawing without the borders. - * - * @author Andrea Marco Sartori - * @return integer - */ - public function getWidthButBorders() - { - return $this->getTotalWidth() - $this->getBordersLength(); - } - - /** - * Calculate the length of the borders. - * - * @author Andrea Marco Sartori - * @return integer - */ - protected function getBordersLength() - { - return $this->getSideBordersLength() * 2; - } - - /** - * Retrieve the spaced core name. - * - * @author Andrea Marco Sartori - * @return string - */ - public function getSpacedCore() - { - $left = $this->getSpacesByCore(); - - $right = $this->getSpacesByCore(true); - - return $left.$this->core.$right; - } - - /** - * Retrieve the blank spaces close to the core. - * - * @author Andrea Marco Sartori - * @param boolean $up - * @return string - */ - protected function getSpacesByCore($up = false) - { - $free = $this->getTotalWidth() - $this->getBordersLength() - $this->getCoreLength(); - - return $free < 1 ? '' : str_repeat(' ', $this->roundHalf($free, $up)); - } - - /** - * Decrease the nesting level. - * - * @author Andrea Marco Sartori - * @return void - */ - public function decreaseNesting() - { - $this->nesting--; - } - +class Geometry +{ + const BORDER_WIDTH = 1; + + const MIN_SPACE_FROM_BORDER_X = 1; + + const MIN_SPACE_FROM_BORDER_Y = 0; + + const ARROW_WIDTH = 1; + + const MIN_PIPE_LENGTH = 8; + + const SPACE_FROM_ARROW = 1; + + /** + * @author Andrea Marco Sartori + * + * @var string $core The name of the core. + */ + protected $core; + + /** + * @author Andrea Marco Sartori + * + * @var array $pipes List of pipes. + */ + protected $pipes; + + /** + * @author Andrea Marco Sartori + * + * @var int $nesting Nesting level. + */ + protected $nesting = 0; + + /** + * Set the name of the core. + * + * @author Andrea Marco Sartori + * + * @param string $core + * + * @return void + */ + public function setCore($core) + { + $this->core = $core; + } + + /** + * Set the pipes. + * + * @author Andrea Marco Sartori + * + * @param array $pipes + * + * @return void + */ + public function setPipes(array $pipes) + { + $this->pipes = $pipes; + } + + /** + * Calculate the half width of the drawing. + * + * @author Andrea Marco Sartori + * + * @param bool $up + * + * @return int + */ + public function getHalfWidth($up = false) + { + $number = $this->getTotalWidth(); + + return $this->roundHalf($number, $up); + } + + /** + * Round the half of a number, either up or down. + * + * @author Andrea Marco Sartori + * + * @param int $number + * @param bool $up + * + * @return int + */ + private function roundHalf($number, $up) + { + $round = $up ? 'ceil' : 'floor'; + + return $round($number / 2); + } + + /** + * Calculate the total width of the drawing. + * + * @author Andrea Marco Sartori + * + * @return int + */ + protected function getTotalWidth() + { + $borders = (static::BORDER_WIDTH + static::MIN_SPACE_FROM_BORDER_X) * 2; + + if (empty($this->pipes)) { + return $borders + $this->getCoreLength(); + } + + $borders *= count($this->pipes); + + $name = ($this->getLongestPipeLength() + static::SPACE_FROM_ARROW) * 2; + + return $borders + $name + static::ARROW_WIDTH; + } + + /** + * Calculate the length of the core name. + * + * @author Andrea Marco Sartori + * + * @return int + */ + protected function getCoreLength() + { + return strlen($this->core); + } + + /** + * Calculate the length of the longest pipe name. + * + * @author Andrea Marco Sartori + * + * @return int + */ + protected function getLongestPipeLength() + { + if (empty($this->pipes)) { + return 0; + } + + return array_reduce($this->pipes, function ($carry, $pipe) { + return strlen($pipe) > $carry ? strlen($pipe) : $carry; + }, static::MIN_PIPE_LENGTH); + } + + /** + * Retrieve the spaced pipe and method pair. + * + * @author Andrea Marco Sartori + * + * @param string $pipe + * @param string $arrow + * @param string $method + * + * @return string + */ + public function getSpacedPipe($pipe, $arrow, $method) + { + $left = $this->getSpacesByWord($pipe); + + $arrow = $this->addSpacesToArrow($arrow); + + $right = $this->getSpacesByWord($method); + + return $left.$pipe.$arrow.$method.$right; + } + + /** + * Retrieve the blank spaces close to a word. + * + * @author Andrea Marco Sartori + * + * @param string $word + * + * @return string + */ + protected function getSpacesByWord($word) + { + $length = $this->getSideBordersLength() + static::SPACE_FROM_ARROW + static::ARROW_WIDTH; + + $extra = $this->getHalfWidth(true) - $length - strlen($word); + + return $extra > 0 ? str_repeat(' ', $extra) : ''; + } + + /** + * Retrieve the length of the borders of a side. + * + * @author Andrea Marco Sartori + * + * @return int + */ + protected function getSideBordersLength() + { + $border = (static::BORDER_WIDTH + static::MIN_SPACE_FROM_BORDER_X); + + return $border * $this->nesting; + } + + /** + * Add spaces around the given arrow. + * + * @author Andrea Marco Sartori + * + * @param string $arrow + * + * @return string + */ + protected function addSpacesToArrow($arrow) + { + $spaces = str_repeat(' ', static::SPACE_FROM_ARROW); + + return "{$spaces}{$arrow}{$spaces}"; + } + + /** + * Retrieve the left borders formatted with the given border. + * + * @author Andrea Marco Sartori + * + * @param string $border + * + * @return string + */ + public function getLeftBordersWith($border) + { + $border = str_repeat($border, static::BORDER_WIDTH); + + $space = str_repeat(' ', static::MIN_SPACE_FROM_BORDER_X); + + return str_repeat("{$border}{$space}", $this->nesting); + } + + /** + * Retrieve the right borders formatted with the given border. + * + * @author Andrea Marco Sartori + * + * @param string $border + * + * @return string + */ + public function getRightBordersWith($border) + { + $space = str_repeat(' ', static::MIN_SPACE_FROM_BORDER_X); + + $border = str_repeat($border, static::BORDER_WIDTH); + + return str_repeat("{$space}{$border}", $this->nesting); + } + + /** + * Increase the nesting level. + * + * @author Andrea Marco Sartori + * + * @return void + */ + public function increaseNesting() + { + $this->nesting++; + } + + /** + * Calculate the width of the drawing without the borders. + * + * @author Andrea Marco Sartori + * + * @return int + */ + public function getWidthButBorders() + { + return $this->getTotalWidth() - $this->getBordersLength(); + } + + /** + * Calculate the length of the borders. + * + * @author Andrea Marco Sartori + * + * @return int + */ + protected function getBordersLength() + { + return $this->getSideBordersLength() * 2; + } + + /** + * Retrieve the spaced core name. + * + * @author Andrea Marco Sartori + * + * @return string + */ + public function getSpacedCore() + { + $left = $this->getSpacesByCore(); + + $right = $this->getSpacesByCore(true); + + return $left.$this->core.$right; + } + + /** + * Retrieve the blank spaces close to the core. + * + * @author Andrea Marco Sartori + * + * @param bool $up + * + * @return string + */ + protected function getSpacesByCore($up = false) + { + $free = $this->getTotalWidth() - $this->getBordersLength() - $this->getCoreLength(); + + return $free < 1 ? '' : str_repeat(' ', $this->roundHalf($free, $up)); + } + + /** + * Decrease the nesting level. + * + * @author Andrea Marco Sartori + * + * @return void + */ + public function decreaseNesting() + { + $this->nesting--; + } } diff --git a/src/Facades/Workflow.php b/src/Facades/Workflow.php index a6efff5..09977a6 100644 --- a/src/Facades/Workflow.php +++ b/src/Facades/Workflow.php @@ -1,17 +1,21 @@ -namespace = $detector->detect(); - } + /** + * @author Andrea Marco Sartori + * + * @var string $namespace The application namespace. + */ + protected $namespace; - /** - * Set the word to inflect. - * - * @author Andrea Marco Sartori - * @param string $word - * @return $this - */ - public function of($word) - { - $this->word = $word; + /** + * Set the application namespace. + * + * @author Andrea Marco Sartori + * + * @param Cerbero\Workflow\Wrappers\NamespaceDetectorInterface $detector Application namespace detector. + * + * @return void + */ + public function __construct(NamespaceDetectorInterface $detector) + { + $this->namespace = $detector->detect(); + } - return $this; - } + /** + * Set the word to inflect. + * + * @author Andrea Marco Sartori + * + * @param string $word + * + * @return $this + */ + public function of($word) + { + $this->word = $word; - /** - * Retrieve the inflected request. - * - * @author Andrea Marco Sartori - * @return string - */ - public function getRequest() - { - return $this->compose('Request', 'Http\Requests'); - } + return $this; + } - /** - * Compose the word to inflect. - * - * @author Andrea Marco Sartori - * @param string $suffix - * @param string $path - * @return string - */ - protected function compose($suffix, $path) - { - $name = ucfirst($this->word) . $suffix; + /** + * Retrieve the inflected request. + * + * @author Andrea Marco Sartori + * + * @return string + */ + public function getRequest() + { + return $this->compose('Request', 'Http\Requests'); + } - return $this->namespace . "\\{$path}\\{$name}"; - } + /** + * Compose the word to inflect. + * + * @author Andrea Marco Sartori + * + * @param string $suffix + * @param string $path + * + * @return string + */ + protected function compose($suffix, $path) + { + $name = ucfirst($this->word).$suffix; - /** - * Retrieve the inflected job. - * - * @author Andrea Marco Sartori - * @return string - */ - public function getJob() - { - return $this->compose('Job', 'Jobs'); - } + return $this->namespace."\\{$path}\\{$name}"; + } + /** + * Retrieve the inflected job. + * + * @author Andrea Marco Sartori + * + * @return string + */ + public function getJob() + { + return $this->compose('Job', 'Jobs'); + } } diff --git a/src/Inflectors/InflectorInterface.php b/src/Inflectors/InflectorInterface.php index 94560e6..91c3fb4 100644 --- a/src/Inflectors/InflectorInterface.php +++ b/src/Inflectors/InflectorInterface.php @@ -1,35 +1,40 @@ -container = $container; - } +abstract class AbstractPipe implements PipeInterface +{ + /** + * @author Andrea Marco Sartori + * + * @var Illuminate\Contracts\Container\Container $container Service container. + */ + protected $container; - /** - * Handle the given job. - * - * @author Andrea Marco Sartori - * @param mixed $job - * @param Closure $next - * @return mixed - */ - public function handle($job, Closure $next) - { - $this->callBefore($job); + /** + * Set the dependencies. + * + * @author Andrea Marco Sartori + * + * @param Illuminate\Contracts\Container\Container $container + * + * @return void + */ + public function __construct(Container $container) + { + $this->container = $container; + } - $handled = $next($job); + /** + * Handle the given job. + * + * @author Andrea Marco Sartori + * + * @param mixed $job + * @param Closure $next + * + * @return mixed + */ + public function handle($job, Closure $next) + { + $this->callBefore($job); - $this->callAfter($handled, $job); + $handled = $next($job); - return $handled; - } + $this->callAfter($handled, $job); - /** - * Call the before method. - * - * @author Andrea Marco Sartori - * @param Cerbero\Jobs\Job $job - * @return void - */ - protected function callBefore($job) - { - $this->callIfExists('before', [$job]); - } + return $handled; + } - /** - * Call a method if it exists and resolve its dependencies. - * - * @author Andrea Marco Sartori - * @param string $method - * @param array $parameters - * @return void - */ - private function callIfExists($method, array $parameters = []) - { - if(method_exists($this, $method)) - { - $this->container->call([$this, $method], $parameters); - } - } + /** + * Call the before method. + * + * @author Andrea Marco Sartori + * + * @param Cerbero\Jobs\Job $job + * + * @return void + */ + protected function callBefore($job) + { + $this->callIfExists('before', [$job]); + } - /** - * Call the after method. - * - * @author Andrea Marco Sartori - * @param mixed $handled - * @param Cerbero\Jobs\Job $job - * @return void - */ - protected function callAfter($handled, $job) - { - $this->callIfExists('after', [$handled, $job]); - } + /** + * Call a method if it exists and resolve its dependencies. + * + * @author Andrea Marco Sartori + * + * @param string $method + * @param array $parameters + * + * @return void + */ + private function callIfExists($method, array $parameters = []) + { + if (method_exists($this, $method)) { + $this->container->call([$this, $method], $parameters); + } + } + /** + * Call the after method. + * + * @author Andrea Marco Sartori + * + * @param mixed $handled + * @param Cerbero\Jobs\Job $job + * + * @return void + */ + protected function callAfter($handled, $job) + { + $this->callIfExists('after', [$handled, $job]); + } } diff --git a/src/Pipes/PipeInterface.php b/src/Pipes/PipeInterface.php index cfa3eed..467b510 100644 --- a/src/Pipes/PipeInterface.php +++ b/src/Pipes/PipeInterface.php @@ -1,22 +1,25 @@ -parser = $parser; - - $this->files = $files; - - $this->path = $path; - - $this->pipelines = $this->parseYaml(); - } - - /** - * Parse the YAML file. - * - * @author Andrea Marco Sartori - * @return array - */ - private function parseYaml() - { - $file = $this->getSource(); - - return (array) $this->parser->parse($file); - } - - /** - * Retrieve the source of the pipelines. - * - * @author Andrea Marco Sartori - * @return string - */ - public function getSource() - { - $path = rtrim($this->path, '/'); - - return "{$path}/workflows.yml"; - } - - /** - * Determine whether a given pipeline exists. - * - * @author Andrea Marco Sartori - * @param string $pipeline - * @return boolean - */ - public function exists($pipeline) - { - $this->normalizePipeline($pipeline); - - return array_key_exists($pipeline, $this->pipelines); - } - - /** - * Normalize the name of the given pipeline. - * - * @author Andrea Marco Sartori - * @param string $pipeline - * @return void - */ - protected function normalizePipeline(&$pipeline) - { - $pipeline = ucfirst($pipeline); - } - - /** - * Retrieve the pipes of a given pipeline. - * - * @author Andrea Marco Sartori - * @param string $pipeline - * @return array - */ - public function getPipesByPipeline($pipeline) - { - $this->normalizePipeline($pipeline); - - return $this->pipelines[$pipeline]; - } - - /** - * Create the pipelines storage. - * - * @author Andrea Marco Sartori - * @return void - */ - public function settle() - { - $this->files->makeDirectory($this->path, 0755, true, true); - - $this->files->put($this->getSource(), ''); - } - - /** - * Store the given pipeline and its pipes. - * - * @author Andrea Marco Sartori - * @param string $pipeline - * @param array $pipes - * @return void - */ - public function store($pipeline, array $pipes) - { - $workflow = [$pipeline => $pipes]; - - $yaml = $this->parser->dump($workflow); - - $this->files->append($this->getSource(), $yaml); - } - - /** - * Update the given pipeline and its pipes. - * - * @author Andrea Marco Sartori - * @param string $pipeline - * @param array $attachments - * @param array $detachments - * @return void - */ - public function update($pipeline, array $attachments, array $detachments) - { - $this->detach($this->pipelines[$pipeline], $detachments); - - $this->attach($this->pipelines[$pipeline], $attachments); - - $this->refreshPipelines(); - } - - /** - * Detach pipes from a given pipeline. - * - * @author Andrea Marco Sartori - * @param array $pipeline - * @param array $pipes - * @return void - */ - protected function detach(array &$pipeline, array $pipes) - { - $pipeline = array_diff($pipeline, $pipes); - } - - /** - * Attach pipes to a given pipeline. - * - * @author Andrea Marco Sartori - * @param array $pipeline - * @param array $pipes - * @return void - */ - protected function attach(array &$pipeline, array $pipes) - { - $pipeline = array_merge($pipeline, $pipes); - } - - /** - * Refresh the pipelines source. - * - * @author Andrea Marco Sartori - * @return void - */ - protected function refreshPipelines() - { - $yaml = $this->parser->dump($this->pipelines); - - $this->files->put($this->getSource(), $yaml); - } - - /** - * Destroy a given pipeline. - * - * @author Andrea Marco Sartori - * @param string $pipeline - * @return void - */ - public function destroy($pipeline) - { - unset($this->pipelines[$pipeline]); - - $this->refreshPipelines(); - } - +class YamlPipelineRepository implements PipelineRepositoryInterface +{ + /** + * @author Andrea Marco Sartori + * + * @var array $pipelines Pipelines list. + */ + protected $pipelines; + + /** + * @author Andrea Marco Sartori + * + * @var Cerbero\Workflow\Wrappers\YamlParserInterface $parser YAML parser. + */ + protected $parser; + + /** + * @author Andrea Marco Sartori + * + * @var Illuminate\Filesystem\Filesystem $files Filesystem. + */ + protected $files; + + /** + * @author Andrea Marco Sartori + * + * @var string $path The workflows path. + */ + protected $path; + + /** + * Set the dependencies. + * + * @author Andrea Marco Sartori + * + * @param Cerbero\Workflow\Wrappers\YamlParserInterface $parser + * @param Illuminate\Filesystem\Filesystem $files + * @param string $path + * + * @return void + */ + public function __construct(YamlParserInterface $parser, Filesystem $files, $path) + { + $this->parser = $parser; + + $this->files = $files; + + $this->path = $path; + + $this->pipelines = $this->parseYaml(); + } + + /** + * Parse the YAML file. + * + * @author Andrea Marco Sartori + * + * @return array + */ + private function parseYaml() + { + $file = $this->getSource(); + + return (array) $this->parser->parse($file); + } + + /** + * Retrieve the source of the pipelines. + * + * @author Andrea Marco Sartori + * + * @return string + */ + public function getSource() + { + $path = rtrim($this->path, '/'); + + return "{$path}/workflows.yml"; + } + + /** + * Determine whether a given pipeline exists. + * + * @author Andrea Marco Sartori + * + * @param string $pipeline + * + * @return bool + */ + public function exists($pipeline) + { + $this->normalizePipeline($pipeline); + + return array_key_exists($pipeline, $this->pipelines); + } + + /** + * Normalize the name of the given pipeline. + * + * @author Andrea Marco Sartori + * + * @param string $pipeline + * + * @return void + */ + protected function normalizePipeline(&$pipeline) + { + $pipeline = ucfirst($pipeline); + } + + /** + * Retrieve the pipes of a given pipeline. + * + * @author Andrea Marco Sartori + * + * @param string $pipeline + * + * @return array + */ + public function getPipesByPipeline($pipeline) + { + $this->normalizePipeline($pipeline); + + return $this->pipelines[$pipeline]; + } + + /** + * Create the pipelines storage. + * + * @author Andrea Marco Sartori + * + * @return void + */ + public function settle() + { + $this->files->makeDirectory($this->path, 0755, true, true); + + $this->files->put($this->getSource(), ''); + } + + /** + * Store the given pipeline and its pipes. + * + * @author Andrea Marco Sartori + * + * @param string $pipeline + * @param array $pipes + * + * @return void + */ + public function store($pipeline, array $pipes) + { + $workflow = [$pipeline => $pipes]; + + $yaml = $this->parser->dump($workflow); + + $this->files->append($this->getSource(), $yaml); + } + + /** + * Update the given pipeline and its pipes. + * + * @author Andrea Marco Sartori + * + * @param string $pipeline + * @param array $attachments + * @param array $detachments + * + * @return void + */ + public function update($pipeline, array $attachments, array $detachments) + { + $this->detach($this->pipelines[$pipeline], $detachments); + + $this->attach($this->pipelines[$pipeline], $attachments); + + $this->refreshPipelines(); + } + + /** + * Detach pipes from a given pipeline. + * + * @author Andrea Marco Sartori + * + * @param array $pipeline + * @param array $pipes + * + * @return void + */ + protected function detach(array &$pipeline, array $pipes) + { + $pipeline = array_diff($pipeline, $pipes); + } + + /** + * Attach pipes to a given pipeline. + * + * @author Andrea Marco Sartori + * + * @param array $pipeline + * @param array $pipes + * + * @return void + */ + protected function attach(array &$pipeline, array $pipes) + { + $pipeline = array_merge($pipeline, $pipes); + } + + /** + * Refresh the pipelines source. + * + * @author Andrea Marco Sartori + * + * @return void + */ + protected function refreshPipelines() + { + $yaml = $this->parser->dump($this->pipelines); + + $this->files->put($this->getSource(), $yaml); + } + + /** + * Destroy a given pipeline. + * + * @author Andrea Marco Sartori + * + * @param string $pipeline + * + * @return void + */ + public function destroy($pipeline) + { + unset($this->pipelines[$pipeline]); + + $this->refreshPipelines(); + } } diff --git a/src/RunsWorkflow.php b/src/RunsWorkflow.php index 7acd65c..9cee654 100644 --- a/src/RunsWorkflow.php +++ b/src/RunsWorkflow.php @@ -1,28 +1,32 @@ -workflow = $workflow; - } +trait RunsWorkflow +{ + /** + * @author Andrea Marco Sartori + * + * @var Cerbero\Workflow\Workflow $workflow Workflows hub. + */ + protected $workflow; + /** + * Set the workflow to run. + * + * @author Andrea Marco Sartori + * + * @param Cerbero\Workflow\Workflow $workflow + * + * @return void + */ + public function setWorkflow(Workflow $workflow) + { + $this->workflow = $workflow; + } } diff --git a/src/Workflow.php b/src/Workflow.php index cbaf469..36b79ab 100644 --- a/src/Workflow.php +++ b/src/Workflow.php @@ -1,7 +1,9 @@ -pipelines = $pipelines; - $this->inflector = $inflector; - $this->container = $container; - $this->dispatcher = $dispatcher; - } - - /** - * Dynamically call pipelines. - * - * @author Andrea Marco Sartori - * @param string $name - * @param array $arguments - * @return mixed - */ - public function __call($name, $arguments) - { - $this->failIfNotExists($name); - - $this->inflector->of($name); - - return $this->dispatchWorkflow($name); - } - - /** - * Throw an exception if the given workflow does not exist. - * - * @author Andrea Marco Sartori - * @param string $workflow - * @return void - */ - protected function failIfNotExists($workflow) - { - if( ! $this->pipelines->exists($workflow)) - { - $error = "The workflow [$workflow] does not exist."; - - throw new \BadFunctionCallException($error); - } - } - - /** - * Dispatch the given workflow. - * - * @author Andrea Marco Sartori - * @param string $workflow - * @return mixed - */ - protected function dispatchWorkflow($workflow) - { - $job = $this->inflector->getJob(); - - $request = $this->resolveRequest(); - - $pipes = $this->pipelines->getPipesByPipeline($workflow); - - $parameters = $this->container->make('router')->current()->parameters(); - - return $this->dispatcher->pipeThrough($pipes)->dispatchFrom($job, $request, $parameters); - } - - /** - * Resolve the apter request. - * - * @author Andrea Marco Sartori - * @return Illuminate\Http\Request - */ - protected function resolveRequest() - { - if(class_exists($request = $this->inflector->getRequest())) - { - return $this->container->make($request); - } - - return $this->container->make('Illuminate\Http\Request'); - } - +class Workflow +{ + /** + * @author Andrea Marco Sartori + * + * @var Cerbero\Workflow\Repositories\PipelineRepositoryInterface $pipelines Pipelines repository. + */ + protected $pipelines; + + /** + * @author Andrea Marco Sartori + * + * @var Cerbero\Workflow\Inflectors\InflectorInterface $inflector Inflector. + */ + protected $inflector; + + /** + * @author Andrea Marco Sartori + * + * @var Illuminate\Contracts\Container\Container $container Service container. + */ + protected $container; + + /** + * @author Andrea Marco Sartori + * + * @var Cerbero\Workflow\Wrappers\DispatcherInterface $dispatcher Bus dispatcher. + */ + protected $dispatcher; + + /** + * Set the dependencies. + * + * @author Andrea Marco Sartori + * + * @param Cerbero\Workflow\Repositories\PipelineRepositoryInterface $pipelines + * @param Cerbero\Workflow\Wrappers\DispatcherInterface $dispatcher + * @param Cerbero\Workflow\Inflectors\InflectorInterface $inflector + * @param Illuminate\Contracts\Container\Container $container + * + * @return void + */ + public function __construct( + PipelineRepositoryInterface $pipelines, + InflectorInterface $inflector, + Container $container, + DispatcherInterface $dispatcher + ) { + $this->pipelines = $pipelines; + $this->inflector = $inflector; + $this->container = $container; + $this->dispatcher = $dispatcher; + } + + /** + * Dynamically call pipelines. + * + * @author Andrea Marco Sartori + * + * @param string $name + * @param array $arguments + * + * @return mixed + */ + public function __call($name, $arguments) + { + $this->failIfNotExists($name); + + $this->inflector->of($name); + + return $this->dispatchWorkflow($name); + } + + /** + * Throw an exception if the given workflow does not exist. + * + * @author Andrea Marco Sartori + * + * @param string $workflow + * + * @return void + */ + protected function failIfNotExists($workflow) + { + if (!$this->pipelines->exists($workflow)) { + $error = "The workflow [$workflow] does not exist."; + + throw new \BadFunctionCallException($error); + } + } + + /** + * Dispatch the given workflow. + * + * @author Andrea Marco Sartori + * + * @param string $workflow + * + * @return mixed + */ + protected function dispatchWorkflow($workflow) + { + $job = $this->inflector->getJob(); + + $request = $this->resolveRequest(); + + $pipes = $this->pipelines->getPipesByPipeline($workflow); + + $parameters = $this->container->make('router')->current()->parameters(); + + return $this->dispatcher->pipeThrough($pipes)->dispatchFrom($job, $request, $parameters); + } + + /** + * Resolve the apter request. + * + * @author Andrea Marco Sartori + * + * @return Illuminate\Http\Request + */ + protected function resolveRequest() + { + if (class_exists($request = $this->inflector->getRequest())) { + return $this->container->make($request); + } + + return $this->container->make('Illuminate\Http\Request'); + } } diff --git a/src/WorkflowRunner.php b/src/WorkflowRunner.php index cfaa0eb..5fbe0e7 100644 --- a/src/WorkflowRunner.php +++ b/src/WorkflowRunner.php @@ -1,19 +1,22 @@ -publishConfig(); - - $this->commands($this->commands); - - $facade = 'Cerbero\Workflow\Facades\Workflow'; - - AliasLoader::getInstance()->alias('Workflow', $facade); - } - - /** - * Publish the configuration file. - * - * @author Andrea Marco Sartori - * @return void - */ - private function publishConfig() - { - $config = __DIR__ . '/config/workflow.php'; - - $this->publishes([$config => config_path('workflow.php')]); - - $this->mergeConfigFrom($config, 'workflow'); - } - - /** - * Register the services. - * - * @author Andrea Marco Sartori - * @return void - */ - public function register() - { - $this->registerPipelineRepository(); - - $this->registerInflector(); - - $this->registerDispatcher(); - - $this->registerWorkflow(); - - $this->registerWorkflowRunnersHook(); - - $this->registerCommands(); - } - - /** - * Register the pipeline repository. - * - * @author Andrea Marco Sartori - * @return void - */ - private function registerPipelineRepository() - { - $abstract = 'Cerbero\Workflow\Repositories\PipelineRepositoryInterface'; - - $this->app->bind($abstract, function($app) - { - return new YamlPipelineRepository - ( - new SymfonyYamlParser, - - new \Illuminate\Filesystem\Filesystem, - - config('workflow.path') - ); - }); - } - - /** - * Register the inflector. - * - * @author Andrea Marco Sartori - * @return void - */ - private function registerInflector() - { - $abstract = 'Cerbero\Workflow\Inflectors\InflectorInterface'; - - $this->app->bind($abstract, function() - { - return new Inflector(new LaravelTraitNamespaceDetector); - }); - } - - /** - * Register the bus dispatcher. - * - * @author Andrea Marco Sartori - * @return void - */ - private function registerDispatcher() - { - $abstract = 'Cerbero\Workflow\Wrappers\DispatcherInterface'; - - $this->app->bind($abstract, function($app) - { - return $app['Cerbero\Workflow\Wrappers\MarshalDispatcher']; - }); - } - - /** - * Register the package main class. - * - * @author Andrea Marco Sartori - * @return void - */ - private function registerWorkflow() - { - $this->app->singleton('cerbero.workflow', function($app) - { - return $app['Cerbero\Workflow\Workflow']; - }); - } - - /** - * Register the hook for the workflow runners. - * - * @author Andrea Marco Sartori - * @return void - */ - private function registerWorkflowRunnersHook() - { - $this->app->afterResolving(function(WorkflowRunner $runner, $app) - { - $runner->setWorkflow($app['cerbero.workflow']); - }); - } - - /** - * Register the console commands. - * - * @author Andrea Marco Sartori - * @return void - */ - private function registerCommands() - { - foreach ($this->commands as $command) - { - $name = ucfirst(last(explode('.', $command))); - - $this->app->singleton($command, function($app) use($name) - { - return $app["Cerbero\Workflow\Console\Commands\\{$name}WorkflowCommand"]; - }); - } - } - +class WorkflowServiceProvider extends ServiceProvider +{ + /** + * @author Andrea Marco Sartori + * + * @var array $commands List of registered commands. + */ + protected $commands = [ + 'cerbero.workflow.create', + 'cerbero.workflow.read', + 'cerbero.workflow.update', + 'cerbero.workflow.delete', + ]; + + /** + * Boot the package up. + * + * @author Andrea Marco Sartori + * + * @return void + */ + public function boot() + { + $this->publishConfig(); + + $this->commands($this->commands); + + $facade = 'Cerbero\Workflow\Facades\Workflow'; + + AliasLoader::getInstance()->alias('Workflow', $facade); + } + + /** + * Publish the configuration file. + * + * @author Andrea Marco Sartori + * + * @return void + */ + private function publishConfig() + { + $config = __DIR__.'/config/workflow.php'; + + $this->publishes([$config => config_path('workflow.php')]); + + $this->mergeConfigFrom($config, 'workflow'); + } + + /** + * Register the services. + * + * @author Andrea Marco Sartori + * + * @return void + */ + public function register() + { + $this->registerPipelineRepository(); + + $this->registerInflector(); + + $this->registerDispatcher(); + + $this->registerWorkflow(); + + $this->registerWorkflowRunnersHook(); + + $this->registerCommands(); + } + + /** + * Register the pipeline repository. + * + * @author Andrea Marco Sartori + * + * @return void + */ + private function registerPipelineRepository() + { + $abstract = 'Cerbero\Workflow\Repositories\PipelineRepositoryInterface'; + + $this->app->bind($abstract, function ($app) { + return new YamlPipelineRepository( + new SymfonyYamlParser(), + + new \Illuminate\Filesystem\Filesystem(), + + config('workflow.path') + ); + }); + } + + /** + * Register the inflector. + * + * @author Andrea Marco Sartori + * + * @return void + */ + private function registerInflector() + { + $abstract = 'Cerbero\Workflow\Inflectors\InflectorInterface'; + + $this->app->bind($abstract, function () { + return new Inflector(new LaravelTraitNamespaceDetector()); + }); + } + + /** + * Register the bus dispatcher. + * + * @author Andrea Marco Sartori + * + * @return void + */ + private function registerDispatcher() + { + $abstract = 'Cerbero\Workflow\Wrappers\DispatcherInterface'; + + $this->app->bind($abstract, function ($app) { + return $app['Cerbero\Workflow\Wrappers\MarshalDispatcher']; + }); + } + + /** + * Register the package main class. + * + * @author Andrea Marco Sartori + * + * @return void + */ + private function registerWorkflow() + { + $this->app->singleton('cerbero.workflow', function ($app) { + return $app['Cerbero\Workflow\Workflow']; + }); + } + + /** + * Register the hook for the workflow runners. + * + * @author Andrea Marco Sartori + * + * @return void + */ + private function registerWorkflowRunnersHook() + { + $this->app->afterResolving(function (WorkflowRunner $runner, $app) { + $runner->setWorkflow($app['cerbero.workflow']); + }); + } + + /** + * Register the console commands. + * + * @author Andrea Marco Sartori + * + * @return void + */ + private function registerCommands() + { + foreach ($this->commands as $command) { + $name = ucfirst(last(explode('.', $command))); + + $this->app->singleton($command, function ($app) use ($name) { + return $app["Cerbero\Workflow\Console\Commands\\{$name}WorkflowCommand"]; + }); + } + } } diff --git a/src/Wrappers/DispatcherInterface.php b/src/Wrappers/DispatcherInterface.php index 9e4c087..bc325d2 100644 --- a/src/Wrappers/DispatcherInterface.php +++ b/src/Wrappers/DispatcherInterface.php @@ -6,11 +6,11 @@ interface DispatcherInterface { - /** * Set the pipes commands should be piped through before dispatching. * - * @param array $pipes + * @param array $pipes + * * @return $this */ public function pipeThrough(array $pipes); @@ -18,11 +18,11 @@ public function pipeThrough(array $pipes); /** * Marshal a command and dispatch it. * - * @param mixed $command - * @param \ArrayAccess $source - * @param array $extras + * @param mixed $command + * @param \ArrayAccess $source + * @param array $extras + * * @return mixed */ public function dispatchFrom($command, ArrayAccess $source, array $extras = []); - } diff --git a/src/Wrappers/LaravelTraitNamespaceDetector.php b/src/Wrappers/LaravelTraitNamespaceDetector.php index 385fcd9..60fefa6 100644 --- a/src/Wrappers/LaravelTraitNamespaceDetector.php +++ b/src/Wrappers/LaravelTraitNamespaceDetector.php @@ -1,4 +1,6 @@ -getAppNamespace(); +class LaravelTraitNamespaceDetector implements NamespaceDetectorInterface +{ + use AppNamespaceDetectorTrait; - return rtrim($namespace, '\\'); - } + /** + * Detect the namespace used by an application. + * + * @author Andrea Marco Sartori + * + * @return string + */ + public function detect() + { + $namespace = $this->getAppNamespace(); + return rtrim($namespace, '\\'); + } } diff --git a/src/Wrappers/MarshalDispatcher.php b/src/Wrappers/MarshalDispatcher.php index 6ccbfc7..c7b1f6b 100644 --- a/src/Wrappers/MarshalDispatcher.php +++ b/src/Wrappers/MarshalDispatcher.php @@ -2,11 +2,11 @@ namespace Cerbero\Workflow\Wrappers; -use Exception; use ArrayAccess; +use Exception; +use Illuminate\Contracts\Bus\Dispatcher; use ReflectionClass; use ReflectionParameter; -use Illuminate\Contracts\Bus\Dispatcher; /** * Wrapper to marshal commands before dispatching them. @@ -15,73 +15,82 @@ */ class MarshalDispatcher implements DispatcherInterface { + /** + * @author Andrea Marco Sartori + * + * @var Illuminate\Contracts\Bus\Dispatcher $dispatcher Bus dispatcher. + */ + protected $dispatcher; + + /** + * @author Andrea Marco Sartori + * + * @var string Command to dispatch + */ + protected $command; - /** - * @author Andrea Marco Sartori - * @var Illuminate\Contracts\Bus\Dispatcher $dispatcher Bus dispatcher. - */ - protected $dispatcher; - - /** - * @author Andrea Marco Sartori - * @var string $command Command to dispatch - */ - protected $command; - - /** - * @author Andrea Marco Sartori - * @var \ArrayAccess $values Parameters values - */ - protected $values; - - /** - * Set the dependencies. - * - * @author Andrea Marco Sartori - * @param Illuminate\Contracts\Bus\Dispatcher $dispatcher - * @return void - */ - public function __construct(Dispatcher $dispatcher) - { - $this->dispatcher = $dispatcher; - } - - /** + /** + * @author Andrea Marco Sartori + * + * @var \ArrayAccess Parameters values + */ + protected $values; + + /** + * Set the dependencies. + * + * @author Andrea Marco Sartori + * + * @param Illuminate\Contracts\Bus\Dispatcher $dispatcher + * + * @return void + */ + public function __construct(Dispatcher $dispatcher) + { + $this->dispatcher = $dispatcher; + } + + /** * Set the pipes commands should be piped through before dispatching. * - * @author Andrea Marco Sartori - * @param array $pipes + * @author Andrea Marco Sartori + * + * @param array $pipes + * * @return $this */ public function pipeThrough(array $pipes) { - $this->dispatcher->pipeThrough($pipes); + $this->dispatcher->pipeThrough($pipes); - return $this; + return $this; } /** * Marshal a command and dispatch it. * - * @author Andrea Marco Sartori - * @param mixed $command - * @param \ArrayAccess $source - * @param array $extras + * @author Andrea Marco Sartori + * + * @param mixed $command + * @param \ArrayAccess $source + * @param array $extras + * * @return mixed */ public function dispatchFrom($command, ArrayAccess $source, array $extras = []) { - $this->command = $command; + $this->command = $command; - $this->values = array_merge((array) $source, $extras); + $this->values = array_merge((array) $source, $extras); - return $this->dispatcher->dispatch($this->marshal()); + return $this->dispatcher->dispatch($this->marshal()); } /** * Marshal the command to dispatch. * - * @author Andrea Marco Sartori + * @author Andrea Marco Sartori + * * @return mixed */ protected function marshal() @@ -99,38 +108,37 @@ protected function marshal() * Retrieve the arguments to inject into the command constructor. * * @author Andrea Marco Sartori - * @param array $parameters - * @return array + * + * @param array $parameters + * + * @return array */ protected function getParamsToInject(array $parameters) { - return array_map(function ($parameter) - { + return array_map(function ($parameter) { return $this->grabParameter($parameter); - }, $parameters); } /** * Get a parameter value for a marshaled command. * - * @author Andrea Marco Sartori - * @param \ReflectionParameter $parameter + * @author Andrea Marco Sartori + * + * @param \ReflectionParameter $parameter + * * @return mixed */ protected function grabParameter(ReflectionParameter $parameter) { - if (isset($this->values[$parameter->name])) - { + if (isset($this->values[$parameter->name])) { return $this->values[$parameter->name]; } - if ($parameter->isDefaultValueAvailable()) - { + if ($parameter->isDefaultValueAvailable()) { return $parameter->getDefaultValue(); } throw new Exception("Unable to map parameter [{$parameter->name}] to command [{$this->command}]"); } - } diff --git a/src/Wrappers/NamespaceDetectorInterface.php b/src/Wrappers/NamespaceDetectorInterface.php index 84c16d0..c611155 100644 --- a/src/Wrappers/NamespaceDetectorInterface.php +++ b/src/Wrappers/NamespaceDetectorInterface.php @@ -1,18 +1,20 @@ -getModule($module); - } - - /** - * Run an Artisan command. - * - * @author Andrea Marco Sartori - * @param string $command - * @return void - */ - public function runArtisan($command) - { - $this->filesystem->amInPath(base_path()); - - $this->cli->runShellCommand("php artisan {$command}"); - } - - /** - * Check if the content of a generated job is equal to the given stub. - * - * @author Andrea Marco Sartori - * @param string $job - * @param string $stub - * @return void - */ - public function seeInJob($job, $stub) - { - $file = "Jobs/{$job}.php"; - - $this->seeStubInFile($file, $stub); - } - - /** - * Check if the content of a generated request is equal to the given stub. - * - * @author Andrea Marco Sartori - * @param string $request - * @param string $stub - * @return void - */ - public function seeInRequest($request, $stub) - { - $file = "Http/Requests/{$request}.php"; - - $this->seeStubInFile($file, $stub); - } - - /** - * Check if the content of a generated pipe is equal to the given stub. - * - * @author Andrea Marco Sartori - * @param string $pipe - * @param string $stub - * @param string $path - * @return void - */ - public function seeInPipe($pipe, $stub, $path = 'Workflows') - { - $file = "{$path}/{$pipe}.php"; - - $this->seeStubInFile($file, $stub); - } - - /** - * Check if the content of the generated workflows list is equal to the given stub. - * - * @author Andrea Marco Sartori - * @param string $stub - * @param string $path - * @return void - */ - public function seeInWorkflows($stub, $path = 'Workflows') - { - $file = "{$path}/workflows.yml"; - - $this->seeStubInFile($file, $stub); - } - - /** - * Check if the content of a file is equal to the given stub. - * - * @author Andrea Marco Sartori - * @param string $file - * @param string $stub - * @return void - */ - public function seeStubInFile($file, $stub) - { - $I = $this->filesystem; - - $I->openFile(app_path($file)); - - $content = $this->getContentOfStub($stub); - - $I->seeFileContentsEqual($content); - } - - /** - * Retrieve the content of a stub. - * - * @author Andrea Marco Sartori - * @param string $stub - * @return string - */ - protected function getContentOfStub($stub) - { - $path = __DIR__ . "/stubs/{$stub}"; - - return file_get_contents($path); - } - - /** - * Remove all the generated files for a given workflow. - * - * @author Andrea Marco Sartori - * @param string $workflow - * @param string $path - * @return void - */ - public function clearWorkflow($workflow, $path = "Workflows") - { - $this->deleteDirIfExists($path); - - $this->deleteFileIfExists("Jobs/{$workflow}Job.php"); - - $this->deleteFileIfExists("Http/Requests/{$workflow}Request.php"); - } - - /** - * Delete a directory if exists. - * - * @author Andrea Marco Sartori - * @param string $path - * @return void - */ - protected function deleteDirIfExists($path) - { - if(file_exists($dir = app_path($path))) - { - $this->filesystem->deleteDir($dir); - } - } - - /** - * Delete a file if exists. - * - * @author Andrea Marco Sartori - * @param string $path - * @return void - */ - protected function deleteFileIfExists($path) - { - if(file_exists($file = app_path($path))) - { - $this->filesystem->deleteFile($file); - } - } - - /** - * Assert a given request does not exist. - * - * @author Andrea Marco Sartori - * @param string $request - * @return void - */ - public function dontSeeRequest($request) - { - $file = app_path("Http/Requests/{$request}.php"); - - $this->filesystem->dontSeeFileFound($file); - } - - /** - * Assert a given pipe does exist. - * - * @author Andrea Marco Sartori - * @param string $pipe - * @param string $path - * @return void - */ - public function seePipe($pipe, $path = 'Workflows') - { - $file = app_path("{$path}/{$pipe}.php"); - - $this->filesystem->seeFileFound($file); - } - - /** - * Assert a given pipe does not exist. - * - * @author Andrea Marco Sartori - * @param string $pipe - * @param string $path - * @return void - */ - public function dontSeePipe($pipe, $path = 'Workflows') - { - $file = app_path("{$path}/{$pipe}.php"); - - $this->filesystem->dontSeeFileFound($file); - } - - /** - * Assert a given job does exist. - * - * @author Andrea Marco Sartori - * @param string $job - * @param string $path - * @return void - */ - public function seeJob($job, $path = 'Jobs') - { - $file = app_path("{$path}/{$job}.php"); - - $this->filesystem->seeFileFound($file); - } - - /** - * Assert a given job does not exist. - * - * @author Andrea Marco Sartori - * @param string $job - * @param string $path - * @return void - */ - public function dontSeeJob($job, $path = 'Jobs') - { - $file = app_path("{$path}/{$job}.php"); - - $this->filesystem->dontSeeFileFound($file); - } - - /** - * Assert a given request does exist. - * - * @author Andrea Marco Sartori - * @param string $request - * @param string $path - * @return void - */ - public function seeRequest($request, $path = 'Http/Requests') - { - $file = app_path("{$path}/{$request}.php"); - - $this->filesystem->seeFileFound($file); - } - - /** - * Check if a drawing is identical to a given stub. - * - * @author Andrea Marco Sartori - * @param string $stub - * @return void - */ - public function seeDrawingIs($stub) - { - $content = $this->getContentOfStub("Drawings/$stub"); - - $this->cli->seeInShellOutput($content); - } - +class FunctionalHelper extends \Codeception\Module +{ + /** + * Dynamically get modules. + * + * @author Andrea Marco Sartori + * + * @param string $name + * + * @return mixed + */ + public function __get($name) + { + $module = ucfirst($name); + + return $this->getModule($module); + } + + /** + * Run an Artisan command. + * + * @author Andrea Marco Sartori + * + * @param string $command + * + * @return void + */ + public function runArtisan($command) + { + $this->filesystem->amInPath(base_path()); + + $this->cli->runShellCommand("php artisan {$command}"); + } + + /** + * Check if the content of a generated job is equal to the given stub. + * + * @author Andrea Marco Sartori + * + * @param string $job + * @param string $stub + * + * @return void + */ + public function seeInJob($job, $stub) + { + $file = "Jobs/{$job}.php"; + + $this->seeStubInFile($file, $stub); + } + + /** + * Check if the content of a generated request is equal to the given stub. + * + * @author Andrea Marco Sartori + * + * @param string $request + * @param string $stub + * + * @return void + */ + public function seeInRequest($request, $stub) + { + $file = "Http/Requests/{$request}.php"; + + $this->seeStubInFile($file, $stub); + } + + /** + * Check if the content of a generated pipe is equal to the given stub. + * + * @author Andrea Marco Sartori + * + * @param string $pipe + * @param string $stub + * @param string $path + * + * @return void + */ + public function seeInPipe($pipe, $stub, $path = 'Workflows') + { + $file = "{$path}/{$pipe}.php"; + + $this->seeStubInFile($file, $stub); + } + + /** + * Check if the content of the generated workflows list is equal to the given stub. + * + * @author Andrea Marco Sartori + * + * @param string $stub + * @param string $path + * + * @return void + */ + public function seeInWorkflows($stub, $path = 'Workflows') + { + $file = "{$path}/workflows.yml"; + + $this->seeStubInFile($file, $stub); + } + + /** + * Check if the content of a file is equal to the given stub. + * + * @author Andrea Marco Sartori + * + * @param string $file + * @param string $stub + * + * @return void + */ + public function seeStubInFile($file, $stub) + { + $I = $this->filesystem; + + $I->openFile(app_path($file)); + + $content = $this->getContentOfStub($stub); + + $I->seeFileContentsEqual($content); + } + + /** + * Retrieve the content of a stub. + * + * @author Andrea Marco Sartori + * + * @param string $stub + * + * @return string + */ + protected function getContentOfStub($stub) + { + $path = __DIR__."/stubs/{$stub}"; + + return file_get_contents($path); + } + + /** + * Remove all the generated files for a given workflow. + * + * @author Andrea Marco Sartori + * + * @param string $workflow + * @param string $path + * + * @return void + */ + public function clearWorkflow($workflow, $path = 'Workflows') + { + $this->deleteDirIfExists($path); + + $this->deleteFileIfExists("Jobs/{$workflow}Job.php"); + + $this->deleteFileIfExists("Http/Requests/{$workflow}Request.php"); + } + + /** + * Delete a directory if exists. + * + * @author Andrea Marco Sartori + * + * @param string $path + * + * @return void + */ + protected function deleteDirIfExists($path) + { + if (file_exists($dir = app_path($path))) { + $this->filesystem->deleteDir($dir); + } + } + + /** + * Delete a file if exists. + * + * @author Andrea Marco Sartori + * + * @param string $path + * + * @return void + */ + protected function deleteFileIfExists($path) + { + if (file_exists($file = app_path($path))) { + $this->filesystem->deleteFile($file); + } + } + + /** + * Assert a given request does not exist. + * + * @author Andrea Marco Sartori + * + * @param string $request + * + * @return void + */ + public function dontSeeRequest($request) + { + $file = app_path("Http/Requests/{$request}.php"); + + $this->filesystem->dontSeeFileFound($file); + } + + /** + * Assert a given pipe does exist. + * + * @author Andrea Marco Sartori + * + * @param string $pipe + * @param string $path + * + * @return void + */ + public function seePipe($pipe, $path = 'Workflows') + { + $file = app_path("{$path}/{$pipe}.php"); + + $this->filesystem->seeFileFound($file); + } + + /** + * Assert a given pipe does not exist. + * + * @author Andrea Marco Sartori + * + * @param string $pipe + * @param string $path + * + * @return void + */ + public function dontSeePipe($pipe, $path = 'Workflows') + { + $file = app_path("{$path}/{$pipe}.php"); + + $this->filesystem->dontSeeFileFound($file); + } + + /** + * Assert a given job does exist. + * + * @author Andrea Marco Sartori + * + * @param string $job + * @param string $path + * + * @return void + */ + public function seeJob($job, $path = 'Jobs') + { + $file = app_path("{$path}/{$job}.php"); + + $this->filesystem->seeFileFound($file); + } + + /** + * Assert a given job does not exist. + * + * @author Andrea Marco Sartori + * + * @param string $job + * @param string $path + * + * @return void + */ + public function dontSeeJob($job, $path = 'Jobs') + { + $file = app_path("{$path}/{$job}.php"); + + $this->filesystem->dontSeeFileFound($file); + } + + /** + * Assert a given request does exist. + * + * @author Andrea Marco Sartori + * + * @param string $request + * @param string $path + * + * @return void + */ + public function seeRequest($request, $path = 'Http/Requests') + { + $file = app_path("{$path}/{$request}.php"); + + $this->filesystem->seeFileFound($file); + } + + /** + * Check if a drawing is identical to a given stub. + * + * @author Andrea Marco Sartori + * + * @param string $stub + * + * @return void + */ + public function seeDrawingIs($stub) + { + $content = $this->getContentOfStub("Drawings/$stub"); + + $this->cli->seeInShellOutput($content); + } } diff --git a/tests/_support/FunctionalTester.php b/tests/_support/FunctionalTester.php index 8f9d5f2..0251435 100644 --- a/tests/_support/FunctionalTester.php +++ b/tests/_support/FunctionalTester.php @@ -2,7 +2,8 @@ /** - * Inherited Methods + * Inherited Methods. + * * @method void wantToTest($text) * @method void wantTo($text) * @method void execute($callable) @@ -15,12 +16,12 @@ * @method \Codeception\Lib\Friend haveFriend($name, $actorClass = null) * * @SuppressWarnings(PHPMD) -*/ + */ class FunctionalTester extends \Codeception\Actor { use _generated\FunctionalTesterActions; - /** + /* * Define custom actions here */ } diff --git a/tests/_support/UnitHelper.php b/tests/_support/UnitHelper.php index dcbc192..b836982 100644 --- a/tests/_support/UnitHelper.php +++ b/tests/_support/UnitHelper.php @@ -1,4 +1,5 @@ * ``` * - * @param string $name the name of the request header + * @param string $name the name of the request header * @param string $value the value to set it to for subsequent - * requests + * requests + * * @see \Codeception\Module\PhpBrowser::setHeader() */ - public function setHeader($name, $value) { + public function setHeader($name, $value) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('setHeader', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -56,15 +57,16 @@ public function setHeader($name, $value) { * $I->amOnPage('some-other-page.php'); * ?> * ``` - * + * * @param string $name the name of the header to delete. + * * @see \Codeception\Module\PhpBrowser::deleteHeader() */ - public function deleteHeader($name) { + public function deleteHeader($name) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('deleteHeader', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -72,13 +74,14 @@ public function deleteHeader($name) { * * @param $username * @param $password + * * @see \Codeception\Module\PhpBrowser::amHttpAuthenticated() */ - public function amHttpAuthenticated($username, $password) { + public function amHttpAuthenticated($username, $password) + { return $this->getScenario()->runStep(new \Codeception\Step\Condition('amHttpAuthenticated', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -90,13 +93,14 @@ public function amHttpAuthenticated($username, $password) { * $I->amOnPage('/quickstart'); // moves to http://codeception.com/quickstart * ?> * ``` + * * @see \Codeception\Module\PhpBrowser::amOnUrl() */ - public function amOnUrl($url) { + public function amOnUrl($url) + { return $this->getScenario()->runStep(new \Codeception\Step\Condition('amOnUrl', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -118,13 +122,14 @@ public function amOnUrl($url) { * @param $subdomain * * @return mixed + * * @see \Codeception\Module\PhpBrowser::amOnSubdomain() */ - public function amOnSubdomain($subdomain) { + public function amOnSubdomain($subdomain) + { return $this->getScenario()->runStep(new \Codeception\Step\Condition('amOnSubdomain', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -145,13 +150,14 @@ public function amOnSubdomain($subdomain) { * If Codeception lacks important Guzzle Client methods, implement them and submit patches. * * @param callable $function + * * @see \Codeception\Module\PhpBrowser::executeInGuzzle() */ - public function executeInGuzzle($function) { + public function executeInGuzzle($function) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('executeInGuzzle', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -166,13 +172,14 @@ public function executeInGuzzle($function) { * ``` * * @param $page + * * @see \Codeception\Lib\InnerBrowser::amOnPage() */ - public function amOnPage($page) { + public function amOnPage($page) + { return $this->getScenario()->runStep(new \Codeception\Step\Condition('amOnPage', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -205,19 +212,20 @@ public function amOnPage($page) { * * @param $link * @param $context + * * @see \Codeception\Lib\InnerBrowser::click() */ - public function click($link, $context = null) { + public function click($link, $context = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('click', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * * Checks that the current page contains the given string (case insensitive). - * - * You can specify a specific HTML element (via CSS or XPath) as the second + * + * You can specify a specific HTML element (via CSS or XPath) as the second * parameter to only search within that element. * * ``` php @@ -226,35 +234,38 @@ public function click($link, $context = null) { * $I->see('Sign Up', 'h1'); // I can suppose it's a signup page * $I->see('Sign Up', '//body/h1'); // with XPath * ``` - * + * * Note that the search is done after stripping all HTML tags from the body, * so `$I->see('strong')` will return true for strings like: - * + * * - `

I am Stronger than thou

` * - `` - * + * * But will *not* be true for strings like: - * + * * - `Home` * - `
Home` * - `` - * + * * For checking the raw source code, use `seeInSource()`. * * @param $text * @param null $selector - * Conditional Assertion: Test won't be stopped on fail + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::see() */ - public function canSee($text, $selector = null) { + public function canSee($text, $selector = null) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('see', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * * Checks that the current page contains the given string (case insensitive). - * - * You can specify a specific HTML element (via CSS or XPath) as the second + * + * You can specify a specific HTML element (via CSS or XPath) as the second * parameter to only search within that element. * * ``` php @@ -263,30 +274,31 @@ public function canSee($text, $selector = null) { * $I->see('Sign Up', 'h1'); // I can suppose it's a signup page * $I->see('Sign Up', '//body/h1'); // with XPath * ``` - * + * * Note that the search is done after stripping all HTML tags from the body, * so `$I->see('strong')` will return true for strings like: - * + * * - `

I am Stronger than thou

` * - `` - * + * * But will *not* be true for strings like: - * + * * - `Home` * - `
Home` * - `` - * + * * For checking the raw source code, use `seeInSource()`. * * @param $text * @param null $selector + * * @see \Codeception\Lib\InnerBrowser::see() */ - public function see($text, $selector = null) { + public function see($text, $selector = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('see', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -299,29 +311,32 @@ public function see($text, $selector = null) { * $I->dontSee('Sign Up','h1'); // I can suppose it's not a signup page * $I->dontSee('Sign Up','//body/h1'); // with XPath * ``` - * + * * Note that the search is done after stripping all HTML tags from the body, * so `$I->dontSee('strong')` will fail on strings like: - * + * * - `

I am Stronger than thou

` * - `` - * + * * But will ignore strings like: - * + * * - `Home` * - `
Home` * - `` - * + * * For checking the raw source code, use `seeInSource()`. * * @param $text * @param null $selector - * Conditional Assertion: Test won't be stopped on fail + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::dontSee() */ - public function cantSee($text, $selector = null) { + public function cantSee($text, $selector = null) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSee', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -334,30 +349,31 @@ public function cantSee($text, $selector = null) { * $I->dontSee('Sign Up','h1'); // I can suppose it's not a signup page * $I->dontSee('Sign Up','//body/h1'); // with XPath * ``` - * + * * Note that the search is done after stripping all HTML tags from the body, * so `$I->dontSee('strong')` will fail on strings like: - * + * * - `

I am Stronger than thou

` * - `` - * + * * But will ignore strings like: - * + * * - `Home` * - `
Home` * - `` - * + * * For checking the raw source code, use `seeInSource()`. * * @param $text * @param null $selector + * * @see \Codeception\Lib\InnerBrowser::dontSee() */ - public function dontSee($text, $selector = null) { + public function dontSee($text, $selector = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSee', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -369,13 +385,16 @@ public function dontSee($text, $selector = null) { * $I->seeInSource('

Green eggs & ham

'); * ``` * - * @param $raw - * Conditional Assertion: Test won't be stopped on fail + * @param $raw + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::seeInSource() */ - public function canSeeInSource($raw) { + public function canSeeInSource($raw) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeInSource', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -387,14 +406,15 @@ public function canSeeInSource($raw) { * $I->seeInSource('

Green eggs & ham

'); * ``` * - * @param $raw + * @param $raw + * * @see \Codeception\Lib\InnerBrowser::seeInSource() */ - public function seeInSource($raw) { + public function seeInSource($raw) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeInSource', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -406,13 +426,16 @@ public function seeInSource($raw) { * $I->dontSeeInSource('

Green eggs & ham

'); * ``` * - * @param $raw - * Conditional Assertion: Test won't be stopped on fail + * @param $raw + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::dontSeeInSource() */ - public function cantSeeInSource($raw) { + public function cantSeeInSource($raw) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInSource', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -424,14 +447,15 @@ public function cantSeeInSource($raw) { * $I->dontSeeInSource('

Green eggs & ham

'); * ``` * - * @param $raw + * @param $raw + * * @see \Codeception\Lib\InnerBrowser::dontSeeInSource() */ - public function dontSeeInSource($raw) { + public function dontSeeInSource($raw) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeInSource', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -447,12 +471,15 @@ public function dontSeeInSource($raw) { * * @param $text * @param null $url - * Conditional Assertion: Test won't be stopped on fail + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::seeLink() */ - public function canSeeLink($text, $url = null) { + public function canSeeLink($text, $url = null) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeLink', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -468,13 +495,14 @@ public function canSeeLink($text, $url = null) { * * @param $text * @param null $url + * * @see \Codeception\Lib\InnerBrowser::seeLink() */ - public function seeLink($text, $url = null) { + public function seeLink($text, $url = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeLink', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -490,12 +518,15 @@ public function seeLink($text, $url = null) { * * @param $text * @param null $url - * Conditional Assertion: Test won't be stopped on fail + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::dontSeeLink() */ - public function cantSeeLink($text, $url = null) { + public function cantSeeLink($text, $url = null) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeLink', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -511,13 +542,14 @@ public function cantSeeLink($text, $url = null) { * * @param $text * @param null $url + * * @see \Codeception\Lib\InnerBrowser::dontSeeLink() */ - public function dontSeeLink($text, $url = null) { + public function dontSeeLink($text, $url = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeLink', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -534,11 +566,14 @@ public function dontSeeLink($text, $url = null) { * * @param $uri * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::seeInCurrentUrl() */ - public function canSeeInCurrentUrl($uri) { + public function canSeeInCurrentUrl($uri) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeInCurrentUrl', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -554,13 +589,14 @@ public function canSeeInCurrentUrl($uri) { * ``` * * @param $uri + * * @see \Codeception\Lib\InnerBrowser::seeInCurrentUrl() */ - public function seeInCurrentUrl($uri) { + public function seeInCurrentUrl($uri) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeInCurrentUrl', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -574,11 +610,14 @@ public function seeInCurrentUrl($uri) { * * @param $uri * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::dontSeeInCurrentUrl() */ - public function cantSeeInCurrentUrl($uri) { + public function cantSeeInCurrentUrl($uri) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInCurrentUrl', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -591,13 +630,14 @@ public function cantSeeInCurrentUrl($uri) { * ``` * * @param $uri + * * @see \Codeception\Lib\InnerBrowser::dontSeeInCurrentUrl() */ - public function dontSeeInCurrentUrl($uri) { + public function dontSeeInCurrentUrl($uri) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeInCurrentUrl', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -613,11 +653,14 @@ public function dontSeeInCurrentUrl($uri) { * * @param $uri * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::seeCurrentUrlEquals() */ - public function canSeeCurrentUrlEquals($uri) { + public function canSeeCurrentUrlEquals($uri) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeCurrentUrlEquals', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -632,13 +675,14 @@ public function canSeeCurrentUrlEquals($uri) { * ``` * * @param $uri + * * @see \Codeception\Lib\InnerBrowser::seeCurrentUrlEquals() */ - public function seeCurrentUrlEquals($uri) { + public function seeCurrentUrlEquals($uri) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeCurrentUrlEquals', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -654,11 +698,14 @@ public function seeCurrentUrlEquals($uri) { * * @param $uri * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::dontSeeCurrentUrlEquals() */ - public function cantSeeCurrentUrlEquals($uri) { + public function cantSeeCurrentUrlEquals($uri) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeCurrentUrlEquals', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -673,13 +720,14 @@ public function cantSeeCurrentUrlEquals($uri) { * ``` * * @param $uri + * * @see \Codeception\Lib\InnerBrowser::dontSeeCurrentUrlEquals() */ - public function dontSeeCurrentUrlEquals($uri) { + public function dontSeeCurrentUrlEquals($uri) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeCurrentUrlEquals', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -694,11 +742,14 @@ public function dontSeeCurrentUrlEquals($uri) { * * @param $uri * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::seeCurrentUrlMatches() */ - public function canSeeCurrentUrlMatches($uri) { + public function canSeeCurrentUrlMatches($uri) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeCurrentUrlMatches', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -712,13 +763,14 @@ public function canSeeCurrentUrlMatches($uri) { * ``` * * @param $uri + * * @see \Codeception\Lib\InnerBrowser::seeCurrentUrlMatches() */ - public function seeCurrentUrlMatches($uri) { + public function seeCurrentUrlMatches($uri) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeCurrentUrlMatches', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -733,11 +785,14 @@ public function seeCurrentUrlMatches($uri) { * * @param $uri * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::dontSeeCurrentUrlMatches() */ - public function cantSeeCurrentUrlMatches($uri) { + public function cantSeeCurrentUrlMatches($uri) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeCurrentUrlMatches', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -751,13 +806,14 @@ public function cantSeeCurrentUrlMatches($uri) { * ``` * * @param $uri + * * @see \Codeception\Lib\InnerBrowser::dontSeeCurrentUrlMatches() */ - public function dontSeeCurrentUrlMatches($uri) { + public function dontSeeCurrentUrlMatches($uri) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeCurrentUrlMatches', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -774,13 +830,14 @@ public function dontSeeCurrentUrlMatches($uri) { * @param null $uri * * @return mixed + * * @see \Codeception\Lib\InnerBrowser::grabFromCurrentUrl() */ - public function grabFromCurrentUrl($uri = null) { + public function grabFromCurrentUrl($uri = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('grabFromCurrentUrl', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -796,11 +853,14 @@ public function grabFromCurrentUrl($uri = null) { * * @param $checkbox * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::seeCheckboxIsChecked() */ - public function canSeeCheckboxIsChecked($checkbox) { + public function canSeeCheckboxIsChecked($checkbox) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeCheckboxIsChecked', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -815,13 +875,14 @@ public function canSeeCheckboxIsChecked($checkbox) { * ``` * * @param $checkbox + * * @see \Codeception\Lib\InnerBrowser::seeCheckboxIsChecked() */ - public function seeCheckboxIsChecked($checkbox) { + public function seeCheckboxIsChecked($checkbox) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeCheckboxIsChecked', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -836,11 +897,14 @@ public function seeCheckboxIsChecked($checkbox) { * * @param $checkbox * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::dontSeeCheckboxIsChecked() */ - public function cantSeeCheckboxIsChecked($checkbox) { + public function cantSeeCheckboxIsChecked($checkbox) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeCheckboxIsChecked', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -854,13 +918,14 @@ public function cantSeeCheckboxIsChecked($checkbox) { * ``` * * @param $checkbox + * * @see \Codeception\Lib\InnerBrowser::dontSeeCheckboxIsChecked() */ - public function dontSeeCheckboxIsChecked($checkbox) { + public function dontSeeCheckboxIsChecked($checkbox) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeCheckboxIsChecked', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -881,11 +946,14 @@ public function dontSeeCheckboxIsChecked($checkbox) { * @param $field * @param $value * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::seeInField() */ - public function canSeeInField($field, $value) { + public function canSeeInField($field, $value) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeInField', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -905,13 +973,14 @@ public function canSeeInField($field, $value) { * * @param $field * @param $value + * * @see \Codeception\Lib\InnerBrowser::seeInField() */ - public function seeInField($field, $value) { + public function seeInField($field, $value) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeInField', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -932,11 +1001,14 @@ public function seeInField($field, $value) { * @param $field * @param $value * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::dontSeeInField() */ - public function cantSeeInField($field, $value) { + public function cantSeeInField($field, $value) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInField', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -956,19 +1028,20 @@ public function cantSeeInField($field, $value) { * * @param $field * @param $value + * * @see \Codeception\Lib\InnerBrowser::dontSeeInField() */ - public function dontSeeInField($field, $value) { + public function dontSeeInField($field, $value) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeInField', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * * Checks if the array of form parameters (name => value) are set on the form matched with the * passed selector. - * + * * ``` php * seeInFormFields('form[name=myform]', [ @@ -977,10 +1050,10 @@ public function dontSeeInField($field, $value) { * ]); * ?> * ``` - * + * * For multi-select elements, or to check values of multiple elements with the same name, an * array may be passed: - * + * * ``` php * seeInFormFields('.form-class', [ @@ -997,7 +1070,7 @@ public function dontSeeInField($field, $value) { * ``` * * Additionally, checkbox values can be checked with a boolean. - * + * * ``` php * seeInFormFields('#form-id', [ @@ -1006,9 +1079,9 @@ public function dontSeeInField($field, $value) { * ]); * ?> * ``` - * + * * Pair this with submitForm for quick testing magic. - * + * * ``` php * seeInFormFields('//form[@id=my-form]', $form); * ?> * ``` - * + * * @param $formSelector * @param $params * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::seeInFormFields() */ - public function canSeeInFormFields($formSelector, $params) { + public function canSeeInFormFields($formSelector, $params) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeInFormFields', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * * Checks if the array of form parameters (name => value) are set on the form matched with the * passed selector. - * + * * ``` php * seeInFormFields('form[name=myform]', [ @@ -1045,10 +1121,10 @@ public function canSeeInFormFields($formSelector, $params) { * ]); * ?> * ``` - * + * * For multi-select elements, or to check values of multiple elements with the same name, an * array may be passed: - * + * * ``` php * seeInFormFields('.form-class', [ @@ -1065,7 +1141,7 @@ public function canSeeInFormFields($formSelector, $params) { * ``` * * Additionally, checkbox values can be checked with a boolean. - * + * * ``` php * seeInFormFields('#form-id', [ @@ -1074,9 +1150,9 @@ public function canSeeInFormFields($formSelector, $params) { * ]); * ?> * ``` - * + * * Pair this with submitForm for quick testing magic. - * + * * ``` php * seeInFormFields('//form[@id=my-form]', $form); * ?> * ``` - * + * * @param $formSelector * @param $params + * * @see \Codeception\Lib\InnerBrowser::seeInFormFields() */ - public function seeInFormFields($formSelector, $params) { + public function seeInFormFields($formSelector, $params) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeInFormFields', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * * Checks if the array of form parameters (name => value) are not set on the form matched with * the passed selector. - * + * * ``` php * dontSeeInFormFields('form[name=myform]', [ @@ -1114,10 +1191,10 @@ public function seeInFormFields($formSelector, $params) { * ]); * ?> * ``` - * + * * To check that an element hasn't been assigned any one of many values, an array can be passed * as the value: - * + * * ``` php * dontSeeInFormFields('.form-class', [ @@ -1130,7 +1207,7 @@ public function seeInFormFields($formSelector, $params) { * ``` * * Additionally, checkbox values can be checked with a boolean. - * + * * ``` php * dontSeeInFormFields('#form-id', [ @@ -1139,21 +1216,24 @@ public function seeInFormFields($formSelector, $params) { * ]); * ?> * ``` - * + * * @param $formSelector * @param $params * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::dontSeeInFormFields() */ - public function cantSeeInFormFields($formSelector, $params) { + public function cantSeeInFormFields($formSelector, $params) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInFormFields', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * * Checks if the array of form parameters (name => value) are not set on the form matched with * the passed selector. - * + * * ``` php * dontSeeInFormFields('form[name=myform]', [ @@ -1162,10 +1242,10 @@ public function cantSeeInFormFields($formSelector, $params) { * ]); * ?> * ``` - * + * * To check that an element hasn't been assigned any one of many values, an array can be passed * as the value: - * + * * ``` php * dontSeeInFormFields('.form-class', [ @@ -1178,7 +1258,7 @@ public function cantSeeInFormFields($formSelector, $params) { * ``` * * Additionally, checkbox values can be checked with a boolean. - * + * * ``` php * dontSeeInFormFields('#form-id', [ @@ -1187,34 +1267,35 @@ public function cantSeeInFormFields($formSelector, $params) { * ]); * ?> * ``` - * + * * @param $formSelector * @param $params + * * @see \Codeception\Lib\InnerBrowser::dontSeeInFormFields() */ - public function dontSeeInFormFields($formSelector, $params) { + public function dontSeeInFormFields($formSelector, $params) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeInFormFields', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * * Submits the given form on the page, optionally with the given form * values. Give the form fields values as an array. * - * Although this function can be used as a short-hand version of - * `fillField()`, `selectOption()`, `click()` etc. it has some important + * Although this function can be used as a short-hand version of + * `fillField()`, `selectOption()`, `click()` etc. it has some important * differences: - * + * * * Only field *names* may be used, not CSS/XPath selectors nor field labels * * If a field is sent to this function that does *not* exist on the page, * it will silently be added to the HTTP request. This is helpful for testing * some types of forms, but be aware that you will *not* get an exception * like you would if you called `fillField()` or `selectOption()` with * a missing field. - * - * Fields that are not provided will be filled by their values from the page, + * + * Fields that are not provided will be filled by their values from the page, * or from any previous calls to `fillField()`, `selectOption()` etc. * You don't need to click the 'Submit' button afterwards. * This command itself triggers the request to form's action. @@ -1277,10 +1358,10 @@ public function dontSeeInFormFields($formSelector, $params) { * ``` * Note that "2" will be the submitted value for the "plan" field, as it is * the selected option. - * + * * You can also emulate a JavaScript submission by not specifying any * buttons in the third parameter to submitForm. - * + * * ```php * submitForm( @@ -1294,10 +1375,10 @@ public function dontSeeInFormFields($formSelector, $params) { * ] * ); * ``` - * - * This function works well when paired with `seeInFormFields()` + * + * This function works well when paired with `seeInFormFields()` * for quickly testing CRUD interfaces and form validation logic. - * + * * ``` php * 'another value', // 'field[]' is already a defined key * ]); * ``` - * + * * The solution is to pass an array value: - * + * * ```php * getScenario()->runStep(new \Codeception\Step\Action('submitForm', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1389,13 +1471,14 @@ public function submitForm($selector, $params, $button = null) { * * @param $field * @param $value + * * @see \Codeception\Lib\InnerBrowser::fillField() */ - public function fillField($field, $value) { + public function fillField($field, $value) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('fillField', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1419,13 +1502,14 @@ public function fillField($field, $value) { * * @param $select * @param $option + * * @see \Codeception\Lib\InnerBrowser::selectOption() */ - public function selectOption($select, $option) { + public function selectOption($select, $option) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('selectOption', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1438,13 +1522,14 @@ public function selectOption($select, $option) { * ``` * * @param $option + * * @see \Codeception\Lib\InnerBrowser::checkOption() */ - public function checkOption($option) { + public function checkOption($option) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('checkOption', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1457,13 +1542,14 @@ public function checkOption($option) { * ``` * * @param $option + * * @see \Codeception\Lib\InnerBrowser::uncheckOption() */ - public function uncheckOption($option) { + public function uncheckOption($option) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('uncheckOption', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1478,13 +1564,14 @@ public function uncheckOption($option) { * * @param $field * @param $filename + * * @see \Codeception\Lib\InnerBrowser::attachFile() */ - public function attachFile($field, $filename) { + public function attachFile($field, $filename) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('attachFile', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1495,13 +1582,14 @@ public function attachFile($field, $filename) { * * @param $uri * @param $params + * * @see \Codeception\Lib\InnerBrowser::sendAjaxGetRequest() */ - public function sendAjaxGetRequest($uri, $params = null) { + public function sendAjaxGetRequest($uri, $params = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('sendAjaxGetRequest', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1523,13 +1611,14 @@ public function sendAjaxGetRequest($uri, $params = null) { * * @param $uri * @param $params + * * @see \Codeception\Lib\InnerBrowser::sendAjaxPostRequest() */ - public function sendAjaxPostRequest($uri, $params = null) { + public function sendAjaxPostRequest($uri, $params = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('sendAjaxPostRequest', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1549,13 +1638,14 @@ public function sendAjaxPostRequest($uri, $params = null) { * @param $method * @param $uri * @param $params + * * @see \Codeception\Lib\InnerBrowser::sendAjaxRequest() */ - public function sendAjaxRequest($method, $uri, $params = null) { + public function sendAjaxRequest($method, $uri, $params = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('sendAjaxRequest', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1573,13 +1663,14 @@ public function sendAjaxRequest($method, $uri, $params = null) { * @param $cssOrXPathOrRegex * * @return mixed + * * @see \Codeception\Lib\InnerBrowser::grabTextFrom() */ - public function grabTextFrom($cssOrXPathOrRegex) { + public function grabTextFrom($cssOrXPathOrRegex) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('grabTextFrom', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1597,58 +1688,62 @@ public function grabTextFrom($cssOrXPathOrRegex) { * @param $attribute * * @return mixed + * * @see \Codeception\Lib\InnerBrowser::grabAttributeFrom() */ - public function grabAttributeFrom($cssOrXpath, $attribute) { + public function grabAttributeFrom($cssOrXpath, $attribute) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('grabAttributeFrom', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * * Grabs either the text content, or attribute values, of nodes * matched by $cssOrXpath and returns them as an array. - * + * * ```html * First * Second * Third * ``` - * + * * ```php * grabMultiple('a'); - * + * * // would return ['#first', '#second', '#third'] * $aLinks = $I->grabMultiple('a', 'href'); * ?> * ``` - * + * * @param $cssOrXpath * @param $attribute + * * @return string[] + * * @see \Codeception\Lib\InnerBrowser::grabMultiple() */ - public function grabMultiple($cssOrXpath, $attribute = null) { + public function grabMultiple($cssOrXpath, $attribute = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('grabMultiple', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * * @param $field * * @return array|mixed|null|string + * * @see \Codeception\Lib\InnerBrowser::grabValueFrom() */ - public function grabValueFrom($field) { + public function grabValueFrom($field) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('grabValueFrom', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1666,13 +1761,14 @@ public function grabValueFrom($field) { * @param array $params * * @return mixed + * * @see \Codeception\Lib\InnerBrowser::setCookie() */ - public function setCookie($name, $val, $params = null) { + public function setCookie($name, $val, $params = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('setCookie', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1680,16 +1776,17 @@ public function setCookie($name, $val, $params = null) { * You can set additional cookie params like `domain`, `path` in array passed as last argument. * * @param $cookie - * * @param array $params + * * @return mixed + * * @see \Codeception\Lib\InnerBrowser::grabCookie() */ - public function grabCookie($cookie, $params = null) { + public function grabCookie($cookie, $params = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('grabCookie', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1704,13 +1801,17 @@ public function grabCookie($cookie, $params = null) { * * @param $cookie * @param array $params + * * @return mixed - * Conditional Assertion: Test won't be stopped on fail + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::seeCookie() */ - public function canSeeCookie($cookie, $params = null) { + public function canSeeCookie($cookie, $params = null) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeCookie', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1725,14 +1826,16 @@ public function canSeeCookie($cookie, $params = null) { * * @param $cookie * @param array $params + * * @return mixed + * * @see \Codeception\Lib\InnerBrowser::seeCookie() */ - public function seeCookie($cookie, $params = null) { + public function seeCookie($cookie, $params = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeCookie', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1740,15 +1843,18 @@ public function seeCookie($cookie, $params = null) { * You can set additional cookie params like `domain`, `path` as array passed in last argument. * * @param $cookie - * * @param array $params + * * @return mixed - * Conditional Assertion: Test won't be stopped on fail + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::dontSeeCookie() */ - public function cantSeeCookie($cookie, $params = null) { + public function cantSeeCookie($cookie, $params = null) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeCookie', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1756,16 +1862,17 @@ public function cantSeeCookie($cookie, $params = null) { * You can set additional cookie params like `domain`, `path` as array passed in last argument. * * @param $cookie - * * @param array $params + * * @return mixed + * * @see \Codeception\Lib\InnerBrowser::dontSeeCookie() */ - public function dontSeeCookie($cookie, $params = null) { + public function dontSeeCookie($cookie, $params = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeCookie', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1773,16 +1880,17 @@ public function dontSeeCookie($cookie, $params = null) { * You can set additional cookie params like `domain`, `path` in array passed as last argument. * * @param $cookie - * * @param array $params + * * @return mixed + * * @see \Codeception\Lib\InnerBrowser::resetCookie() */ - public function resetCookie($name, $params = null) { + public function resetCookie($name, $params = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('resetCookie', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1803,13 +1911,17 @@ public function resetCookie($name, $params = null) { * * @param $selector * @param array $attributes + * * @return * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::seeElement() */ - public function canSeeElement($selector, $attributes = null) { + public function canSeeElement($selector, $attributes = null) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeElement', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1830,14 +1942,16 @@ public function canSeeElement($selector, $attributes = null) { * * @param $selector * @param array $attributes + * * @return + * * @see \Codeception\Lib\InnerBrowser::seeElement() */ - public function seeElement($selector, $attributes = null) { + public function seeElement($selector, $attributes = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeElement', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1855,12 +1969,15 @@ public function seeElement($selector, $attributes = null) { * * @param $selector * @param array $attributes - * Conditional Assertion: Test won't be stopped on fail + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::dontSeeElement() */ - public function cantSeeElement($selector, $attributes = null) { + public function cantSeeElement($selector, $attributes = null) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeElement', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1878,13 +1995,14 @@ public function cantSeeElement($selector, $attributes = null) { * * @param $selector * @param array $attributes + * * @see \Codeception\Lib\InnerBrowser::dontSeeElement() */ - public function dontSeeElement($selector, $attributes = null) { + public function dontSeeElement($selector, $attributes = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeElement', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1896,16 +2014,20 @@ public function dontSeeElement($selector, $attributes = null) { * $I->seeNumberOfElements('tr', [0,10]); //between 0 and 10 elements * ?> * ``` + * * @param $selector * @param mixed $expected : - * - string: strict number - * - array: range of numbers [0,10] - * Conditional Assertion: Test won't be stopped on fail + * - string: strict number + * - array: range of numbers [0,10] + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::seeNumberOfElements() */ - public function canSeeNumberOfElements($selector, $expected) { + public function canSeeNumberOfElements($selector, $expected) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeNumberOfElements', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1917,17 +2039,19 @@ public function canSeeNumberOfElements($selector, $expected) { * $I->seeNumberOfElements('tr', [0,10]); //between 0 and 10 elements * ?> * ``` + * * @param $selector * @param mixed $expected : - * - string: strict number - * - array: range of numbers [0,10] + * - string: strict number + * - array: range of numbers [0,10] + * * @see \Codeception\Lib\InnerBrowser::seeNumberOfElements() */ - public function seeNumberOfElements($selector, $expected) { + public function seeNumberOfElements($selector, $expected) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeNumberOfElements', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1943,12 +2067,15 @@ public function seeNumberOfElements($selector, $expected) { * @param $optionText * * @return mixed - * Conditional Assertion: Test won't be stopped on fail + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::seeOptionIsSelected() */ - public function canSeeOptionIsSelected($selector, $optionText) { + public function canSeeOptionIsSelected($selector, $optionText) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeOptionIsSelected', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1964,13 +2091,14 @@ public function canSeeOptionIsSelected($selector, $optionText) { * @param $optionText * * @return mixed + * * @see \Codeception\Lib\InnerBrowser::seeOptionIsSelected() */ - public function seeOptionIsSelected($selector, $optionText) { + public function seeOptionIsSelected($selector, $optionText) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeOptionIsSelected', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1986,12 +2114,15 @@ public function seeOptionIsSelected($selector, $optionText) { * @param $optionText * * @return mixed - * Conditional Assertion: Test won't be stopped on fail + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::dontSeeOptionIsSelected() */ - public function cantSeeOptionIsSelected($selector, $optionText) { + public function cantSeeOptionIsSelected($selector, $optionText) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeOptionIsSelected', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -2007,34 +2138,39 @@ public function cantSeeOptionIsSelected($selector, $optionText) { * @param $optionText * * @return mixed + * * @see \Codeception\Lib\InnerBrowser::dontSeeOptionIsSelected() */ - public function dontSeeOptionIsSelected($selector, $optionText) { + public function dontSeeOptionIsSelected($selector, $optionText) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeOptionIsSelected', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * * Asserts that current page has 404 response status code. * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::seePageNotFound() */ - public function canSeePageNotFound() { + public function canSeePageNotFound() + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seePageNotFound', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * * Asserts that current page has 404 response status code. + * * @see \Codeception\Lib\InnerBrowser::seePageNotFound() */ - public function seePageNotFound() { + public function seePageNotFound() + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seePageNotFound', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -2043,12 +2179,15 @@ public function seePageNotFound() { * @param $code * * @return mixed - * Conditional Assertion: Test won't be stopped on fail + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::seeResponseCodeIs() */ - public function canSeeResponseCodeIs($code) { + public function canSeeResponseCodeIs($code) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeResponseCodeIs', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -2057,13 +2196,14 @@ public function canSeeResponseCodeIs($code) { * @param $code * * @return mixed + * * @see \Codeception\Lib\InnerBrowser::seeResponseCodeIs() */ - public function seeResponseCodeIs($code) { + public function seeResponseCodeIs($code) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeResponseCodeIs', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -2078,12 +2218,15 @@ public function seeResponseCodeIs($code) { * @param $title * * @return mixed - * Conditional Assertion: Test won't be stopped on fail + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::seeInTitle() */ - public function canSeeInTitle($title) { + public function canSeeInTitle($title) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeInTitle', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -2098,13 +2241,14 @@ public function canSeeInTitle($title) { * @param $title * * @return mixed + * * @see \Codeception\Lib\InnerBrowser::seeInTitle() */ - public function seeInTitle($title) { + public function seeInTitle($title) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeInTitle', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -2113,12 +2257,15 @@ public function seeInTitle($title) { * @param $title * * @return mixed - * Conditional Assertion: Test won't be stopped on fail + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::dontSeeInTitle() */ - public function cantSeeInTitle($title) { + public function cantSeeInTitle($title) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInTitle', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -2127,13 +2274,14 @@ public function cantSeeInTitle($title) { * @param $title * * @return mixed + * * @see \Codeception\Lib\InnerBrowser::dontSeeInTitle() */ - public function dontSeeInTitle($title) { + public function dontSeeInTitle($title) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeInTitle', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -2151,22 +2299,25 @@ public function dontSeeInTitle($title) { * ``` * * @param string $name + * * @see \Codeception\Lib\InnerBrowser::switchToIframe() */ - public function switchToIframe($name) { + public function switchToIframe($name) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('switchToIframe', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * * Moves back in history. - * + * * @param int $numberOfSteps (default value 1) + * * @see \Codeception\Lib\InnerBrowser::moveBack() */ - public function moveBack($numberOfSteps = null) { + public function moveBack($numberOfSteps = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('moveBack', func_get_args())); } } diff --git a/tests/_support/_generated/FunctionalTesterActions.php b/tests/_support/_generated/FunctionalTesterActions.php index e28f45b..9b40eac 100644 --- a/tests/_support/_generated/FunctionalTesterActions.php +++ b/tests/_support/_generated/FunctionalTesterActions.php @@ -1,4 +1,6 @@ -getScenario()->runStep(new \Codeception\Step\Condition('amInPath', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -47,13 +46,14 @@ public function amInPath($path) { * ``` * * @param $filename + * * @see \Codeception\Module\Filesystem::openFile() */ - public function openFile($filename) { + public function openFile($filename) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('openFile', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -66,13 +66,14 @@ public function openFile($filename) { * ``` * * @param $filename + * * @see \Codeception\Module\Filesystem::deleteFile() */ - public function deleteFile($filename) { + public function deleteFile($filename) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('deleteFile', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -85,13 +86,14 @@ public function deleteFile($filename) { * ``` * * @param $dirname + * * @see \Codeception\Module\Filesystem::deleteDir() */ - public function deleteDir($dirname) { + public function deleteDir($dirname) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('deleteDir', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -105,13 +107,14 @@ public function deleteDir($dirname) { * * @param $src * @param $dst + * * @see \Codeception\Module\Filesystem::copyDir() */ - public function copyDir($src, $dst) { + public function copyDir($src, $dst) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('copyDir', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -128,11 +131,14 @@ public function copyDir($src, $dst) { * * @param $text * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Module\Filesystem::seeInThisFile() */ - public function canSeeInThisFile($text) { + public function canSeeInThisFile($text) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeInThisFile', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -148,13 +154,14 @@ public function canSeeInThisFile($text) { * ``` * * @param $text + * * @see \Codeception\Module\Filesystem::seeInThisFile() */ - public function seeInThisFile($text) { + public function seeInThisFile($text) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeInThisFile', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -172,11 +179,14 @@ public function seeInThisFile($text) { * * @param $text * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Module\Filesystem::seeFileContentsEqual() */ - public function canSeeFileContentsEqual($text) { + public function canSeeFileContentsEqual($text) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeFileContentsEqual', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -193,13 +203,14 @@ public function canSeeFileContentsEqual($text) { * ``` * * @param $text + * * @see \Codeception\Module\Filesystem::seeFileContentsEqual() */ - public function seeFileContentsEqual($text) { + public function seeFileContentsEqual($text) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeFileContentsEqual', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -214,11 +225,14 @@ public function seeFileContentsEqual($text) { * * @param $text * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Module\Filesystem::dontSeeInThisFile() */ - public function cantSeeInThisFile($text) { + public function cantSeeInThisFile($text) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInThisFile', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -232,24 +246,26 @@ public function cantSeeInThisFile($text) { * ``` * * @param $text + * * @see \Codeception\Module\Filesystem::dontSeeInThisFile() */ - public function dontSeeInThisFile($text) { + public function dontSeeInThisFile($text) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeInThisFile', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * * Deletes a file + * * @see \Codeception\Module\Filesystem::deleteThisFile() */ - public function deleteThisFile() { + public function deleteThisFile() + { return $this->getScenario()->runStep(new \Codeception\Step\Action('deleteThisFile', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -264,12 +280,15 @@ public function deleteThisFile() { * * @param $filename * @param string $path - * Conditional Assertion: Test won't be stopped on fail + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Module\Filesystem::seeFileFound() */ - public function canSeeFileFound($filename, $path = null) { + public function canSeeFileFound($filename, $path = null) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeFileFound', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -284,13 +303,14 @@ public function canSeeFileFound($filename, $path = null) { * * @param $filename * @param string $path + * * @see \Codeception\Module\Filesystem::seeFileFound() */ - public function seeFileFound($filename, $path = null) { + public function seeFileFound($filename, $path = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeFileFound', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -298,12 +318,15 @@ public function seeFileFound($filename, $path = null) { * * @param $filename * @param string $path - * Conditional Assertion: Test won't be stopped on fail + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Module\Filesystem::dontSeeFileFound() */ - public function cantSeeFileFound($filename, $path = null) { + public function cantSeeFileFound($filename, $path = null) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeFileFound', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -311,13 +334,14 @@ public function cantSeeFileFound($filename, $path = null) { * * @param $filename * @param string $path + * * @see \Codeception\Module\Filesystem::dontSeeFileFound() */ - public function dontSeeFileFound($filename, $path = null) { + public function dontSeeFileFound($filename, $path = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeFileFound', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -330,13 +354,14 @@ public function dontSeeFileFound($filename, $path = null) { * ``` * * @param $dirname + * * @see \Codeception\Module\Filesystem::cleanDir() */ - public function cleanDir($dirname) { + public function cleanDir($dirname) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('cleanDir', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -344,414 +369,517 @@ public function cleanDir($dirname) { * * @param $filename * @param $contents + * * @see \Codeception\Module\Filesystem::writeToFile() */ - public function writeToFile($filename, $contents) { + public function writeToFile($filename, $contents) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('writeToFile', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * * Run an Artisan command. - * - * @author Andrea Marco Sartori - * @param string $command - * @return void + * + * @author Andrea Marco Sartori + * + * @param string $command + * + * @return void + * * @see \Codeception\Module\FunctionalHelper::runArtisan() */ - public function runArtisan($command) { + public function runArtisan($command) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('runArtisan', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * * Check if the content of a generated job is equal to the given stub. - * - * @author Andrea Marco Sartori - * @param string $job - * @param string $stub - * @return void - * Conditional Assertion: Test won't be stopped on fail + * + * @author Andrea Marco Sartori + * + * @param string $job + * @param string $stub + * + * @return void + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Module\FunctionalHelper::seeInJob() */ - public function canSeeInJob($job, $stub) { + public function canSeeInJob($job, $stub) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeInJob', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * * Check if the content of a generated job is equal to the given stub. - * - * @author Andrea Marco Sartori - * @param string $job - * @param string $stub - * @return void + * + * @author Andrea Marco Sartori + * + * @param string $job + * @param string $stub + * + * @return void + * * @see \Codeception\Module\FunctionalHelper::seeInJob() */ - public function seeInJob($job, $stub) { + public function seeInJob($job, $stub) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeInJob', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * * Check if the content of a generated request is equal to the given stub. - * - * @author Andrea Marco Sartori - * @param string $request - * @param string $stub - * @return void - * Conditional Assertion: Test won't be stopped on fail + * + * @author Andrea Marco Sartori + * + * @param string $request + * @param string $stub + * + * @return void + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Module\FunctionalHelper::seeInRequest() */ - public function canSeeInRequest($request, $stub) { + public function canSeeInRequest($request, $stub) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeInRequest', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * * Check if the content of a generated request is equal to the given stub. - * - * @author Andrea Marco Sartori - * @param string $request - * @param string $stub - * @return void + * + * @author Andrea Marco Sartori + * + * @param string $request + * @param string $stub + * + * @return void + * * @see \Codeception\Module\FunctionalHelper::seeInRequest() */ - public function seeInRequest($request, $stub) { + public function seeInRequest($request, $stub) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeInRequest', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * * Check if the content of a generated pipe is equal to the given stub. - * - * @author Andrea Marco Sartori - * @param string $pipe - * @param string $stub - * @param string $path - * @return void - * Conditional Assertion: Test won't be stopped on fail + * + * @author Andrea Marco Sartori + * + * @param string $pipe + * @param string $stub + * @param string $path + * + * @return void + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Module\FunctionalHelper::seeInPipe() */ - public function canSeeInPipe($pipe, $stub, $path = null) { + public function canSeeInPipe($pipe, $stub, $path = null) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeInPipe', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * * Check if the content of a generated pipe is equal to the given stub. - * - * @author Andrea Marco Sartori - * @param string $pipe - * @param string $stub - * @param string $path - * @return void + * + * @author Andrea Marco Sartori + * + * @param string $pipe + * @param string $stub + * @param string $path + * + * @return void + * * @see \Codeception\Module\FunctionalHelper::seeInPipe() */ - public function seeInPipe($pipe, $stub, $path = null) { + public function seeInPipe($pipe, $stub, $path = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeInPipe', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * * Check if the content of the generated workflows list is equal to the given stub. - * - * @author Andrea Marco Sartori - * @param string $stub - * @param string $path - * @return void - * Conditional Assertion: Test won't be stopped on fail + * + * @author Andrea Marco Sartori + * + * @param string $stub + * @param string $path + * + * @return void + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Module\FunctionalHelper::seeInWorkflows() */ - public function canSeeInWorkflows($stub, $path = null) { + public function canSeeInWorkflows($stub, $path = null) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeInWorkflows', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * * Check if the content of the generated workflows list is equal to the given stub. - * - * @author Andrea Marco Sartori - * @param string $stub - * @param string $path - * @return void + * + * @author Andrea Marco Sartori + * + * @param string $stub + * @param string $path + * + * @return void + * * @see \Codeception\Module\FunctionalHelper::seeInWorkflows() */ - public function seeInWorkflows($stub, $path = null) { + public function seeInWorkflows($stub, $path = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeInWorkflows', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * * Check if the content of a file is equal to the given stub. - * - * @author Andrea Marco Sartori - * @param string $file - * @param string $stub - * @return void - * Conditional Assertion: Test won't be stopped on fail + * + * @author Andrea Marco Sartori + * + * @param string $file + * @param string $stub + * + * @return void + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Module\FunctionalHelper::seeStubInFile() */ - public function canSeeStubInFile($file, $stub) { + public function canSeeStubInFile($file, $stub) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeStubInFile', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * * Check if the content of a file is equal to the given stub. - * - * @author Andrea Marco Sartori - * @param string $file - * @param string $stub - * @return void + * + * @author Andrea Marco Sartori + * + * @param string $file + * @param string $stub + * + * @return void + * * @see \Codeception\Module\FunctionalHelper::seeStubInFile() */ - public function seeStubInFile($file, $stub) { + public function seeStubInFile($file, $stub) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeStubInFile', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * * Remove all the generated files for a given workflow. - * - * @author Andrea Marco Sartori - * @param string $workflow - * @param string $path - * @return void + * + * @author Andrea Marco Sartori + * + * @param string $workflow + * @param string $path + * + * @return void + * * @see \Codeception\Module\FunctionalHelper::clearWorkflow() */ - public function clearWorkflow($workflow, $path = null) { + public function clearWorkflow($workflow, $path = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('clearWorkflow', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * * Assert a given request does not exist. - * - * @author Andrea Marco Sartori - * @param string $request - * @return void - * Conditional Assertion: Test won't be stopped on fail + * + * @author Andrea Marco Sartori + * + * @param string $request + * + * @return void + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Module\FunctionalHelper::dontSeeRequest() */ - public function cantSeeRequest($request) { + public function cantSeeRequest($request) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeRequest', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * * Assert a given request does not exist. - * - * @author Andrea Marco Sartori - * @param string $request - * @return void + * + * @author Andrea Marco Sartori + * + * @param string $request + * + * @return void + * * @see \Codeception\Module\FunctionalHelper::dontSeeRequest() */ - public function dontSeeRequest($request) { + public function dontSeeRequest($request) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeRequest', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * * Assert a given pipe does exist. - * - * @author Andrea Marco Sartori - * @param string $pipe - * @param string $path - * @return void - * Conditional Assertion: Test won't be stopped on fail + * + * @author Andrea Marco Sartori + * + * @param string $pipe + * @param string $path + * + * @return void + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Module\FunctionalHelper::seePipe() */ - public function canSeePipe($pipe, $path = null) { + public function canSeePipe($pipe, $path = null) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seePipe', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * * Assert a given pipe does exist. - * - * @author Andrea Marco Sartori - * @param string $pipe - * @param string $path - * @return void + * + * @author Andrea Marco Sartori + * + * @param string $pipe + * @param string $path + * + * @return void + * * @see \Codeception\Module\FunctionalHelper::seePipe() */ - public function seePipe($pipe, $path = null) { + public function seePipe($pipe, $path = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seePipe', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * * Assert a given pipe does not exist. - * - * @author Andrea Marco Sartori - * @param string $pipe - * @param string $path - * @return void - * Conditional Assertion: Test won't be stopped on fail + * + * @author Andrea Marco Sartori + * + * @param string $pipe + * @param string $path + * + * @return void + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Module\FunctionalHelper::dontSeePipe() */ - public function cantSeePipe($pipe, $path = null) { + public function cantSeePipe($pipe, $path = null) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeePipe', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * * Assert a given pipe does not exist. - * - * @author Andrea Marco Sartori - * @param string $pipe - * @param string $path - * @return void + * + * @author Andrea Marco Sartori + * + * @param string $pipe + * @param string $path + * + * @return void + * * @see \Codeception\Module\FunctionalHelper::dontSeePipe() */ - public function dontSeePipe($pipe, $path = null) { + public function dontSeePipe($pipe, $path = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeePipe', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * * Assert a given job does exist. - * - * @author Andrea Marco Sartori - * @param string $job - * @param string $path - * @return void - * Conditional Assertion: Test won't be stopped on fail + * + * @author Andrea Marco Sartori + * + * @param string $job + * @param string $path + * + * @return void + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Module\FunctionalHelper::seeJob() */ - public function canSeeJob($job, $path = null) { + public function canSeeJob($job, $path = null) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeJob', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * * Assert a given job does exist. - * - * @author Andrea Marco Sartori - * @param string $job - * @param string $path - * @return void + * + * @author Andrea Marco Sartori + * + * @param string $job + * @param string $path + * + * @return void + * * @see \Codeception\Module\FunctionalHelper::seeJob() */ - public function seeJob($job, $path = null) { + public function seeJob($job, $path = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeJob', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * * Assert a given job does not exist. - * - * @author Andrea Marco Sartori - * @param string $job - * @param string $path - * @return void - * Conditional Assertion: Test won't be stopped on fail + * + * @author Andrea Marco Sartori + * + * @param string $job + * @param string $path + * + * @return void + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Module\FunctionalHelper::dontSeeJob() */ - public function cantSeeJob($job, $path = null) { + public function cantSeeJob($job, $path = null) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeJob', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * * Assert a given job does not exist. - * - * @author Andrea Marco Sartori - * @param string $job - * @param string $path - * @return void + * + * @author Andrea Marco Sartori + * + * @param string $job + * @param string $path + * + * @return void + * * @see \Codeception\Module\FunctionalHelper::dontSeeJob() */ - public function dontSeeJob($job, $path = null) { + public function dontSeeJob($job, $path = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeJob', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * * Assert a given request does exist. - * - * @author Andrea Marco Sartori - * @param string $request - * @param string $path - * @return void - * Conditional Assertion: Test won't be stopped on fail + * + * @author Andrea Marco Sartori + * + * @param string $request + * @param string $path + * + * @return void + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Module\FunctionalHelper::seeRequest() */ - public function canSeeRequest($request, $path = null) { + public function canSeeRequest($request, $path = null) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeRequest', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * * Assert a given request does exist. - * - * @author Andrea Marco Sartori - * @param string $request - * @param string $path - * @return void + * + * @author Andrea Marco Sartori + * + * @param string $request + * @param string $path + * + * @return void + * * @see \Codeception\Module\FunctionalHelper::seeRequest() */ - public function seeRequest($request, $path = null) { + public function seeRequest($request, $path = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeRequest', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * * Check if a drawing is identical to a given stub. - * - * @author Andrea Marco Sartori - * @param string $stub - * @return void - * Conditional Assertion: Test won't be stopped on fail + * + * @author Andrea Marco Sartori + * + * @param string $stub + * + * @return void + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Module\FunctionalHelper::seeDrawingIs() */ - public function canSeeDrawingIs($stub) { + public function canSeeDrawingIs($stub) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeDrawingIs', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * * Check if a drawing is identical to a given stub. - * - * @author Andrea Marco Sartori - * @param string $stub - * @return void + * + * @author Andrea Marco Sartori + * + * @param string $stub + * + * @return void + * * @see \Codeception\Module\FunctionalHelper::seeDrawingIs() */ - public function seeDrawingIs($stub) { + public function seeDrawingIs($stub) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeDrawingIs', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -768,13 +896,14 @@ public function seeDrawingIs($stub) { * * @param $command * @param bool $failNonZero + * * @see \Codeception\Module\Cli::runShellCommand() */ - public function runShellCommand($command, $failNonZero = null) { + public function runShellCommand($command, $failNonZero = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('runShellCommand', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -782,24 +911,28 @@ public function runShellCommand($command, $failNonZero = null) { * * @param $text * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Module\Cli::seeInShellOutput() */ - public function canSeeInShellOutput($text) { + public function canSeeInShellOutput($text) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeInShellOutput', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * * Checks that output from last executed command contains text * * @param $text + * * @see \Codeception\Module\Cli::seeInShellOutput() */ - public function seeInShellOutput($text) { + public function seeInShellOutput($text) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeInShellOutput', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -808,11 +941,14 @@ public function seeInShellOutput($text) { * @param $text * * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Module\Cli::dontSeeInShellOutput() */ - public function cantSeeInShellOutput($text) { + public function cantSeeInShellOutput($text) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInShellOutput', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -822,56 +958,61 @@ public function cantSeeInShellOutput($text) { * * @see \Codeception\Module\Cli::dontSeeInShellOutput() */ - public function dontSeeInShellOutput($text) { + public function dontSeeInShellOutput($text) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeInShellOutput', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * * * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Module\Cli::seeShellOutputMatches() */ - public function canSeeShellOutputMatches($regex) { + public function canSeeShellOutputMatches($regex) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeShellOutputMatches', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * * * @see \Codeception\Module\Cli::seeShellOutputMatches() */ - public function seeShellOutputMatches($regex) { + public function seeShellOutputMatches($regex) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeShellOutputMatches', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * * Provides access the Laravel application object. * * @return \Illuminate\Foundation\Application + * * @see \Codeception\Module\Laravel5::getApplication() */ - public function getApplication() { + public function getApplication() + { return $this->getScenario()->runStep(new \Codeception\Step\Action('getApplication', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * * @param $app + * * @see \Codeception\Module\Laravel5::setApplication() */ - public function setApplication($app) { + public function setApplication($app) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('setApplication', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -882,13 +1023,14 @@ public function setApplication($app) { * $I->disableMiddleware(); * ?> * ``` + * * @see \Codeception\Module\Laravel5::disableMiddleware() */ - public function disableMiddleware() { + public function disableMiddleware() + { return $this->getScenario()->runStep(new \Codeception\Step\Action('disableMiddleware', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -899,13 +1041,14 @@ public function disableMiddleware() { * $I->disableEvents(); * ?> * ``` + * * @see \Codeception\Module\Laravel5::disableEvents() */ - public function disableEvents() { + public function disableEvents() + { return $this->getScenario()->runStep(new \Codeception\Step\Action('disableEvents', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -919,13 +1062,17 @@ public function disableEvents() { * $I->seeEventTriggered(['App\MyEvent', 'App\MyOtherEvent']); * ?> * ``` + * * @param $events * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Module\Laravel5::seeEventTriggered() */ - public function canSeeEventTriggered($events) { + public function canSeeEventTriggered($events) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeEventTriggered', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -939,14 +1086,16 @@ public function canSeeEventTriggered($events) { * $I->seeEventTriggered(['App\MyEvent', 'App\MyOtherEvent']); * ?> * ``` + * * @param $events + * * @see \Codeception\Module\Laravel5::seeEventTriggered() */ - public function seeEventTriggered($events) { + public function seeEventTriggered($events) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeEventTriggered', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -960,13 +1109,17 @@ public function seeEventTriggered($events) { * $I->dontSeeEventTriggered(['App\MyEvent', 'App\MyOtherEvent']); * ?> * ``` + * * @param $events * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Module\Laravel5::dontSeeEventTriggered() */ - public function cantSeeEventTriggered($events) { + public function cantSeeEventTriggered($events) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeEventTriggered', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -980,14 +1133,16 @@ public function cantSeeEventTriggered($events) { * $I->dontSeeEventTriggered(['App\MyEvent', 'App\MyOtherEvent']); * ?> * ``` + * * @param $events + * * @see \Codeception\Module\Laravel5::dontSeeEventTriggered() */ - public function dontSeeEventTriggered($events) { + public function dontSeeEventTriggered($events) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeEventTriggered', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1001,13 +1156,14 @@ public function dontSeeEventTriggered($events) { * * @param $routeName * @param array $params + * * @see \Codeception\Module\Laravel5::amOnRoute() */ - public function amOnRoute($routeName, $params = null) { + public function amOnRoute($routeName, $params = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Condition('amOnRoute', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1018,13 +1174,17 @@ public function amOnRoute($routeName, $params = null) { * $I->seeCurrentRouteIs('posts.index'); * ?> * ``` + * * @param $routeName * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Module\Laravel5::seeCurrentRouteIs() */ - public function canSeeCurrentRouteIs($routeName) { + public function canSeeCurrentRouteIs($routeName) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeCurrentRouteIs', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1035,14 +1195,16 @@ public function canSeeCurrentRouteIs($routeName) { * $I->seeCurrentRouteIs('posts.index'); * ?> * ``` + * * @param $routeName + * * @see \Codeception\Module\Laravel5::seeCurrentRouteIs() */ - public function seeCurrentRouteIs($routeName) { + public function seeCurrentRouteIs($routeName) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeCurrentRouteIs', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1056,13 +1218,14 @@ public function seeCurrentRouteIs($routeName) { * * @param $action * @param array $params + * * @see \Codeception\Module\Laravel5::amOnAction() */ - public function amOnAction($action, $params = null) { + public function amOnAction($action, $params = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Condition('amOnAction', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1076,11 +1239,14 @@ public function amOnAction($action, $params = null) { * * @param $action * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Module\Laravel5::seeCurrentActionIs() */ - public function canSeeCurrentActionIs($action) { + public function canSeeCurrentActionIs($action) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeCurrentActionIs', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1093,13 +1259,14 @@ public function canSeeCurrentActionIs($action) { * ``` * * @param $action + * * @see \Codeception\Module\Laravel5::seeCurrentActionIs() */ - public function seeCurrentActionIs($action) { + public function seeCurrentActionIs($action) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeCurrentActionIs', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1112,15 +1279,19 @@ public function seeCurrentActionIs($action) { * ?> * ``` * - * @param string|array $key - * @param mixed|null $value + * @param string|array $key + * @param mixed|null $value + * * @return void - * Conditional Assertion: Test won't be stopped on fail + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Module\Laravel5::seeInSession() */ - public function canSeeInSession($key, $value = null) { + public function canSeeInSession($key, $value = null) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeInSession', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1133,16 +1304,18 @@ public function canSeeInSession($key, $value = null) { * ?> * ``` * - * @param string|array $key - * @param mixed|null $value + * @param string|array $key + * @param mixed|null $value + * * @return void + * * @see \Codeception\Module\Laravel5::seeInSession() */ - public function seeInSession($key, $value = null) { + public function seeInSession($key, $value = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeInSession', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1155,14 +1328,18 @@ public function seeInSession($key, $value = null) { * ?> * ``` * - * @param array $bindings + * @param array $bindings + * * @return void - * Conditional Assertion: Test won't be stopped on fail + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Module\Laravel5::seeSessionHasValues() */ - public function canSeeSessionHasValues($bindings) { + public function canSeeSessionHasValues($bindings) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeSessionHasValues', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1175,15 +1352,17 @@ public function canSeeSessionHasValues($bindings) { * ?> * ``` * - * @param array $bindings + * @param array $bindings + * * @return void + * * @see \Codeception\Module\Laravel5::seeSessionHasValues() */ - public function seeSessionHasValues($bindings) { + public function seeSessionHasValues($bindings) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeSessionHasValues', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1196,12 +1375,15 @@ public function seeSessionHasValues($bindings) { * ``` * * @return bool - * Conditional Assertion: Test won't be stopped on fail + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Module\Laravel5::seeFormHasErrors() */ - public function canSeeFormHasErrors() { + public function canSeeFormHasErrors() + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeFormHasErrors', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1214,13 +1396,14 @@ public function canSeeFormHasErrors() { * ``` * * @return bool + * * @see \Codeception\Module\Laravel5::seeFormHasErrors() */ - public function seeFormHasErrors() { + public function seeFormHasErrors() + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeFormHasErrors', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1233,12 +1416,15 @@ public function seeFormHasErrors() { * ``` * * @return bool - * Conditional Assertion: Test won't be stopped on fail + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Module\Laravel5::dontSeeFormErrors() */ - public function cantSeeFormErrors() { + public function cantSeeFormErrors() + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeFormErrors', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1251,13 +1437,14 @@ public function cantSeeFormErrors() { * ``` * * @return bool + * * @see \Codeception\Module\Laravel5::dontSeeFormErrors() */ - public function dontSeeFormErrors() { + public function dontSeeFormErrors() + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeFormErrors', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1273,13 +1460,17 @@ public function dontSeeFormErrors() { * ]); * ?> * ``` + * * @param array $bindings - * Conditional Assertion: Test won't be stopped on fail + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Module\Laravel5::seeFormErrorMessages() */ - public function canSeeFormErrorMessages($bindings) { + public function canSeeFormErrorMessages($bindings) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeFormErrorMessages', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1295,14 +1486,16 @@ public function canSeeFormErrorMessages($bindings) { * ]); * ?> * ``` + * * @param array $bindings + * * @see \Codeception\Module\Laravel5::seeFormErrorMessages() */ - public function seeFormErrorMessages($bindings) { + public function seeFormErrorMessages($bindings) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeFormErrorMessages', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1320,14 +1513,18 @@ public function seeFormErrorMessages($bindings) { * $I->seeFormErrorMessage('username', 'Invalid Username'); * ?> * ``` - * @param string $key + * + * @param string $key * @param string|null $expectedErrorMessage - * Conditional Assertion: Test won't be stopped on fail + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Module\Laravel5::seeFormErrorMessage() */ - public function canSeeFormErrorMessage($key, $expectedErrorMessage = null) { + public function canSeeFormErrorMessage($key, $expectedErrorMessage = null) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeFormErrorMessage', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1345,15 +1542,17 @@ public function canSeeFormErrorMessage($key, $expectedErrorMessage = null) { * $I->seeFormErrorMessage('username', 'Invalid Username'); * ?> * ``` - * @param string $key + * + * @param string $key * @param string|null $expectedErrorMessage + * * @see \Codeception\Module\Laravel5::seeFormErrorMessage() */ - public function seeFormErrorMessage($key, $expectedErrorMessage = null) { + public function seeFormErrorMessage($key, $expectedErrorMessage = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeFormErrorMessage', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1372,69 +1571,81 @@ public function seeFormErrorMessage($key, $expectedErrorMessage = null) { * // can be verified with $I->seeAuthentication(); * ?> * ``` - * @param \Illuminate\Contracts\Auth\User|array $user - * @param string|null $driver 'eloquent', 'database', or custom driver + * + * @param \Illuminate\Contracts\Auth\User|array $user + * @param string|null $driver 'eloquent', 'database', or custom driver + * * @return void + * * @see \Codeception\Module\Laravel5::amLoggedAs() */ - public function amLoggedAs($user, $driver = null) { + public function amLoggedAs($user, $driver = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Condition('amLoggedAs', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * * Logout user. + * * @see \Codeception\Module\Laravel5::logout() */ - public function logout() { + public function logout() + { return $this->getScenario()->runStep(new \Codeception\Step\Action('logout', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * * Checks that a user is authenticated * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Module\Laravel5::seeAuthentication() */ - public function canSeeAuthentication() { + public function canSeeAuthentication() + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeAuthentication', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * * Checks that a user is authenticated + * * @see \Codeception\Module\Laravel5::seeAuthentication() */ - public function seeAuthentication() { + public function seeAuthentication() + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeAuthentication', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * * Check that user is not authenticated * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Module\Laravel5::dontSeeAuthentication() */ - public function cantSeeAuthentication() { + public function cantSeeAuthentication() + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeAuthentication', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * * Check that user is not authenticated + * * @see \Codeception\Module\Laravel5::dontSeeAuthentication() */ - public function dontSeeAuthentication() { + public function dontSeeAuthentication() + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeAuthentication', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1456,15 +1667,17 @@ public function dontSeeAuthentication() { * ?> * ``` * - * @param string $class + * @param string $class + * * @return mixed + * * @see \Codeception\Module\Laravel5::grabService() */ - public function grabService($class) { + public function grabService($class) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('grabService', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1478,15 +1691,17 @@ public function grabService($class) { * * @param $tableName * @param array $attributes + * * @return mixed * @part orm + * * @see \Codeception\Module\Laravel5::haveRecord() */ - public function haveRecord($tableName, $attributes = null) { + public function haveRecord($tableName, $attributes = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('haveRecord', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1502,11 +1717,14 @@ public function haveRecord($tableName, $attributes = null) { * @param array $attributes * @part orm * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Module\Laravel5::seeRecord() */ - public function canSeeRecord($tableName, $attributes = null) { + public function canSeeRecord($tableName, $attributes = null) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeRecord', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1521,13 +1739,14 @@ public function canSeeRecord($tableName, $attributes = null) { * @param $tableName * @param array $attributes * @part orm + * * @see \Codeception\Module\Laravel5::seeRecord() */ - public function seeRecord($tableName, $attributes = null) { + public function seeRecord($tableName, $attributes = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeRecord', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1543,11 +1762,14 @@ public function seeRecord($tableName, $attributes = null) { * @param array $attributes * @part orm * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Module\Laravel5::dontSeeRecord() */ - public function cantSeeRecord($tableName, $attributes = null) { + public function cantSeeRecord($tableName, $attributes = null) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeRecord', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1562,13 +1784,14 @@ public function cantSeeRecord($tableName, $attributes = null) { * @param $tableName * @param array $attributes * @part orm + * * @see \Codeception\Module\Laravel5::dontSeeRecord() */ - public function dontSeeRecord($tableName, $attributes = null) { + public function dontSeeRecord($tableName, $attributes = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeRecord', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1582,26 +1805,28 @@ public function dontSeeRecord($tableName, $attributes = null) { * * @param $tableName * @param array $attributes + * * @return mixed * @part orm + * * @see \Codeception\Module\Laravel5::grabRecord() */ - public function grabRecord($tableName, $attributes = null) { + public function grabRecord($tableName, $attributes = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('grabRecord', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * * * @see \Codeception\Module\Laravel5::haveModel() */ - public function haveModel($model, $attributes = null, $name = null, $times = null) { + public function haveModel($model, $attributes = null, $name = null, $times = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('haveModel', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1618,18 +1843,21 @@ public function haveModel($model, $attributes = null, $name = null, $times = nul * ``` * * @see http://laravel.com/docs/5.1/testing#model-factories + * * @param string $model - * @param array $attributes + * @param array $attributes * @param string $name - * @param int $times + * @param int $times + * * @return mixed + * * @see \Codeception\Module\Laravel5::createModel() */ - public function createModel($model, $attributes = null, $name = null, $times = null) { + public function createModel($model, $attributes = null, $name = null, $times = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('createModel', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1646,18 +1874,21 @@ public function createModel($model, $attributes = null, $name = null, $times = n * ``` * * @see http://laravel.com/docs/5.1/testing#model-factories + * * @param string $model - * @param array $attributes + * @param array $attributes * @param string $name - * @param int $times + * @param int $times + * * @return mixed + * * @see \Codeception\Module\Laravel5::makeModel() */ - public function makeModel($model, $attributes = null, $name = null, $times = null) { + public function makeModel($model, $attributes = null, $name = null, $times = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('makeModel', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1665,13 +1896,14 @@ public function makeModel($model, $attributes = null, $name = null, $times = nul * * @param $username * @param $password + * * @see \Codeception\Lib\InnerBrowser::amHttpAuthenticated() */ - public function amHttpAuthenticated($username, $password) { + public function amHttpAuthenticated($username, $password) + { return $this->getScenario()->runStep(new \Codeception\Step\Condition('amHttpAuthenticated', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1686,13 +1918,14 @@ public function amHttpAuthenticated($username, $password) { * ``` * * @param $page + * * @see \Codeception\Lib\InnerBrowser::amOnPage() */ - public function amOnPage($page) { + public function amOnPage($page) + { return $this->getScenario()->runStep(new \Codeception\Step\Condition('amOnPage', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1725,19 +1958,20 @@ public function amOnPage($page) { * * @param $link * @param $context + * * @see \Codeception\Lib\InnerBrowser::click() */ - public function click($link, $context = null) { + public function click($link, $context = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('click', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * * Checks that the current page contains the given string (case insensitive). - * - * You can specify a specific HTML element (via CSS or XPath) as the second + * + * You can specify a specific HTML element (via CSS or XPath) as the second * parameter to only search within that element. * * ``` php @@ -1746,35 +1980,38 @@ public function click($link, $context = null) { * $I->see('Sign Up', 'h1'); // I can suppose it's a signup page * $I->see('Sign Up', '//body/h1'); // with XPath * ``` - * + * * Note that the search is done after stripping all HTML tags from the body, * so `$I->see('strong')` will return true for strings like: - * + * * - `

I am Stronger than thou

` * - `` - * + * * But will *not* be true for strings like: - * + * * - `Home` * - `
Home` * - `` - * + * * For checking the raw source code, use `seeInSource()`. * * @param $text * @param null $selector - * Conditional Assertion: Test won't be stopped on fail + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::see() */ - public function canSee($text, $selector = null) { + public function canSee($text, $selector = null) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('see', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * * Checks that the current page contains the given string (case insensitive). - * - * You can specify a specific HTML element (via CSS or XPath) as the second + * + * You can specify a specific HTML element (via CSS or XPath) as the second * parameter to only search within that element. * * ``` php @@ -1783,30 +2020,31 @@ public function canSee($text, $selector = null) { * $I->see('Sign Up', 'h1'); // I can suppose it's a signup page * $I->see('Sign Up', '//body/h1'); // with XPath * ``` - * + * * Note that the search is done after stripping all HTML tags from the body, * so `$I->see('strong')` will return true for strings like: - * + * * - `

I am Stronger than thou

` * - `` - * + * * But will *not* be true for strings like: - * + * * - `Home` * - `
Home` * - `` - * + * * For checking the raw source code, use `seeInSource()`. * * @param $text * @param null $selector + * * @see \Codeception\Lib\InnerBrowser::see() */ - public function see($text, $selector = null) { + public function see($text, $selector = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('see', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1819,29 +2057,32 @@ public function see($text, $selector = null) { * $I->dontSee('Sign Up','h1'); // I can suppose it's not a signup page * $I->dontSee('Sign Up','//body/h1'); // with XPath * ``` - * + * * Note that the search is done after stripping all HTML tags from the body, * so `$I->dontSee('strong')` will fail on strings like: - * + * * - `

I am Stronger than thou

` * - `` - * + * * But will ignore strings like: - * + * * - `Home` * - `
Home` * - `` - * + * * For checking the raw source code, use `seeInSource()`. * * @param $text * @param null $selector - * Conditional Assertion: Test won't be stopped on fail + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::dontSee() */ - public function cantSee($text, $selector = null) { + public function cantSee($text, $selector = null) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSee', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1854,30 +2095,31 @@ public function cantSee($text, $selector = null) { * $I->dontSee('Sign Up','h1'); // I can suppose it's not a signup page * $I->dontSee('Sign Up','//body/h1'); // with XPath * ``` - * + * * Note that the search is done after stripping all HTML tags from the body, * so `$I->dontSee('strong')` will fail on strings like: - * + * * - `

I am Stronger than thou

` * - `` - * + * * But will ignore strings like: - * + * * - `Home` * - `
Home` * - `` - * + * * For checking the raw source code, use `seeInSource()`. * * @param $text * @param null $selector + * * @see \Codeception\Lib\InnerBrowser::dontSee() */ - public function dontSee($text, $selector = null) { + public function dontSee($text, $selector = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSee', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1889,13 +2131,16 @@ public function dontSee($text, $selector = null) { * $I->seeInSource('

Green eggs & ham

'); * ``` * - * @param $raw - * Conditional Assertion: Test won't be stopped on fail + * @param $raw + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::seeInSource() */ - public function canSeeInSource($raw) { + public function canSeeInSource($raw) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeInSource', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1907,14 +2152,15 @@ public function canSeeInSource($raw) { * $I->seeInSource('

Green eggs & ham

'); * ``` * - * @param $raw + * @param $raw + * * @see \Codeception\Lib\InnerBrowser::seeInSource() */ - public function seeInSource($raw) { + public function seeInSource($raw) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeInSource', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1926,13 +2172,16 @@ public function seeInSource($raw) { * $I->dontSeeInSource('

Green eggs & ham

'); * ``` * - * @param $raw - * Conditional Assertion: Test won't be stopped on fail + * @param $raw + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::dontSeeInSource() */ - public function cantSeeInSource($raw) { + public function cantSeeInSource($raw) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInSource', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1944,14 +2193,15 @@ public function cantSeeInSource($raw) { * $I->dontSeeInSource('

Green eggs & ham

'); * ``` * - * @param $raw + * @param $raw + * * @see \Codeception\Lib\InnerBrowser::dontSeeInSource() */ - public function dontSeeInSource($raw) { + public function dontSeeInSource($raw) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeInSource', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1967,12 +2217,15 @@ public function dontSeeInSource($raw) { * * @param $text * @param null $url - * Conditional Assertion: Test won't be stopped on fail + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::seeLink() */ - public function canSeeLink($text, $url = null) { + public function canSeeLink($text, $url = null) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeLink', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1988,13 +2241,14 @@ public function canSeeLink($text, $url = null) { * * @param $text * @param null $url + * * @see \Codeception\Lib\InnerBrowser::seeLink() */ - public function seeLink($text, $url = null) { + public function seeLink($text, $url = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeLink', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -2010,12 +2264,15 @@ public function seeLink($text, $url = null) { * * @param $text * @param null $url - * Conditional Assertion: Test won't be stopped on fail + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::dontSeeLink() */ - public function cantSeeLink($text, $url = null) { + public function cantSeeLink($text, $url = null) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeLink', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -2031,13 +2288,14 @@ public function cantSeeLink($text, $url = null) { * * @param $text * @param null $url + * * @see \Codeception\Lib\InnerBrowser::dontSeeLink() */ - public function dontSeeLink($text, $url = null) { + public function dontSeeLink($text, $url = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeLink', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -2054,11 +2312,14 @@ public function dontSeeLink($text, $url = null) { * * @param $uri * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::seeInCurrentUrl() */ - public function canSeeInCurrentUrl($uri) { + public function canSeeInCurrentUrl($uri) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeInCurrentUrl', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -2074,13 +2335,14 @@ public function canSeeInCurrentUrl($uri) { * ``` * * @param $uri + * * @see \Codeception\Lib\InnerBrowser::seeInCurrentUrl() */ - public function seeInCurrentUrl($uri) { + public function seeInCurrentUrl($uri) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeInCurrentUrl', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -2094,11 +2356,14 @@ public function seeInCurrentUrl($uri) { * * @param $uri * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::dontSeeInCurrentUrl() */ - public function cantSeeInCurrentUrl($uri) { + public function cantSeeInCurrentUrl($uri) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInCurrentUrl', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -2111,13 +2376,14 @@ public function cantSeeInCurrentUrl($uri) { * ``` * * @param $uri + * * @see \Codeception\Lib\InnerBrowser::dontSeeInCurrentUrl() */ - public function dontSeeInCurrentUrl($uri) { + public function dontSeeInCurrentUrl($uri) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeInCurrentUrl', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -2133,11 +2399,14 @@ public function dontSeeInCurrentUrl($uri) { * * @param $uri * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::seeCurrentUrlEquals() */ - public function canSeeCurrentUrlEquals($uri) { + public function canSeeCurrentUrlEquals($uri) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeCurrentUrlEquals', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -2152,13 +2421,14 @@ public function canSeeCurrentUrlEquals($uri) { * ``` * * @param $uri + * * @see \Codeception\Lib\InnerBrowser::seeCurrentUrlEquals() */ - public function seeCurrentUrlEquals($uri) { + public function seeCurrentUrlEquals($uri) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeCurrentUrlEquals', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -2174,11 +2444,14 @@ public function seeCurrentUrlEquals($uri) { * * @param $uri * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::dontSeeCurrentUrlEquals() */ - public function cantSeeCurrentUrlEquals($uri) { + public function cantSeeCurrentUrlEquals($uri) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeCurrentUrlEquals', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -2193,13 +2466,14 @@ public function cantSeeCurrentUrlEquals($uri) { * ``` * * @param $uri + * * @see \Codeception\Lib\InnerBrowser::dontSeeCurrentUrlEquals() */ - public function dontSeeCurrentUrlEquals($uri) { + public function dontSeeCurrentUrlEquals($uri) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeCurrentUrlEquals', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -2214,11 +2488,14 @@ public function dontSeeCurrentUrlEquals($uri) { * * @param $uri * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::seeCurrentUrlMatches() */ - public function canSeeCurrentUrlMatches($uri) { + public function canSeeCurrentUrlMatches($uri) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeCurrentUrlMatches', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -2232,13 +2509,14 @@ public function canSeeCurrentUrlMatches($uri) { * ``` * * @param $uri + * * @see \Codeception\Lib\InnerBrowser::seeCurrentUrlMatches() */ - public function seeCurrentUrlMatches($uri) { + public function seeCurrentUrlMatches($uri) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeCurrentUrlMatches', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -2253,11 +2531,14 @@ public function seeCurrentUrlMatches($uri) { * * @param $uri * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::dontSeeCurrentUrlMatches() */ - public function cantSeeCurrentUrlMatches($uri) { + public function cantSeeCurrentUrlMatches($uri) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeCurrentUrlMatches', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -2271,13 +2552,14 @@ public function cantSeeCurrentUrlMatches($uri) { * ``` * * @param $uri + * * @see \Codeception\Lib\InnerBrowser::dontSeeCurrentUrlMatches() */ - public function dontSeeCurrentUrlMatches($uri) { + public function dontSeeCurrentUrlMatches($uri) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeCurrentUrlMatches', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -2294,13 +2576,14 @@ public function dontSeeCurrentUrlMatches($uri) { * @param null $uri * * @return mixed + * * @see \Codeception\Lib\InnerBrowser::grabFromCurrentUrl() */ - public function grabFromCurrentUrl($uri = null) { + public function grabFromCurrentUrl($uri = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('grabFromCurrentUrl', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -2316,11 +2599,14 @@ public function grabFromCurrentUrl($uri = null) { * * @param $checkbox * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::seeCheckboxIsChecked() */ - public function canSeeCheckboxIsChecked($checkbox) { + public function canSeeCheckboxIsChecked($checkbox) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeCheckboxIsChecked', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -2335,13 +2621,14 @@ public function canSeeCheckboxIsChecked($checkbox) { * ``` * * @param $checkbox + * * @see \Codeception\Lib\InnerBrowser::seeCheckboxIsChecked() */ - public function seeCheckboxIsChecked($checkbox) { + public function seeCheckboxIsChecked($checkbox) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeCheckboxIsChecked', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -2356,11 +2643,14 @@ public function seeCheckboxIsChecked($checkbox) { * * @param $checkbox * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::dontSeeCheckboxIsChecked() */ - public function cantSeeCheckboxIsChecked($checkbox) { + public function cantSeeCheckboxIsChecked($checkbox) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeCheckboxIsChecked', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -2374,13 +2664,14 @@ public function cantSeeCheckboxIsChecked($checkbox) { * ``` * * @param $checkbox + * * @see \Codeception\Lib\InnerBrowser::dontSeeCheckboxIsChecked() */ - public function dontSeeCheckboxIsChecked($checkbox) { + public function dontSeeCheckboxIsChecked($checkbox) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeCheckboxIsChecked', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -2401,11 +2692,14 @@ public function dontSeeCheckboxIsChecked($checkbox) { * @param $field * @param $value * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::seeInField() */ - public function canSeeInField($field, $value) { + public function canSeeInField($field, $value) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeInField', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -2425,13 +2719,14 @@ public function canSeeInField($field, $value) { * * @param $field * @param $value + * * @see \Codeception\Lib\InnerBrowser::seeInField() */ - public function seeInField($field, $value) { + public function seeInField($field, $value) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeInField', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -2452,11 +2747,14 @@ public function seeInField($field, $value) { * @param $field * @param $value * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::dontSeeInField() */ - public function cantSeeInField($field, $value) { + public function cantSeeInField($field, $value) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInField', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -2476,19 +2774,20 @@ public function cantSeeInField($field, $value) { * * @param $field * @param $value + * * @see \Codeception\Lib\InnerBrowser::dontSeeInField() */ - public function dontSeeInField($field, $value) { + public function dontSeeInField($field, $value) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeInField', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * * Checks if the array of form parameters (name => value) are set on the form matched with the * passed selector. - * + * * ``` php * seeInFormFields('form[name=myform]', [ @@ -2497,10 +2796,10 @@ public function dontSeeInField($field, $value) { * ]); * ?> * ``` - * + * * For multi-select elements, or to check values of multiple elements with the same name, an * array may be passed: - * + * * ``` php * seeInFormFields('.form-class', [ @@ -2517,7 +2816,7 @@ public function dontSeeInField($field, $value) { * ``` * * Additionally, checkbox values can be checked with a boolean. - * + * * ``` php * seeInFormFields('#form-id', [ @@ -2526,9 +2825,9 @@ public function dontSeeInField($field, $value) { * ]); * ?> * ``` - * + * * Pair this with submitForm for quick testing magic. - * + * * ``` php * seeInFormFields('//form[@id=my-form]', $form); * ?> * ``` - * + * * @param $formSelector * @param $params * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::seeInFormFields() */ - public function canSeeInFormFields($formSelector, $params) { + public function canSeeInFormFields($formSelector, $params) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeInFormFields', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * * Checks if the array of form parameters (name => value) are set on the form matched with the * passed selector. - * + * * ``` php * seeInFormFields('form[name=myform]', [ @@ -2565,10 +2867,10 @@ public function canSeeInFormFields($formSelector, $params) { * ]); * ?> * ``` - * + * * For multi-select elements, or to check values of multiple elements with the same name, an * array may be passed: - * + * * ``` php * seeInFormFields('.form-class', [ @@ -2585,7 +2887,7 @@ public function canSeeInFormFields($formSelector, $params) { * ``` * * Additionally, checkbox values can be checked with a boolean. - * + * * ``` php * seeInFormFields('#form-id', [ @@ -2594,9 +2896,9 @@ public function canSeeInFormFields($formSelector, $params) { * ]); * ?> * ``` - * + * * Pair this with submitForm for quick testing magic. - * + * * ``` php * seeInFormFields('//form[@id=my-form]', $form); * ?> * ``` - * + * * @param $formSelector * @param $params + * * @see \Codeception\Lib\InnerBrowser::seeInFormFields() */ - public function seeInFormFields($formSelector, $params) { + public function seeInFormFields($formSelector, $params) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeInFormFields', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * * Checks if the array of form parameters (name => value) are not set on the form matched with * the passed selector. - * + * * ``` php * dontSeeInFormFields('form[name=myform]', [ @@ -2634,10 +2937,10 @@ public function seeInFormFields($formSelector, $params) { * ]); * ?> * ``` - * + * * To check that an element hasn't been assigned any one of many values, an array can be passed * as the value: - * + * * ``` php * dontSeeInFormFields('.form-class', [ @@ -2650,7 +2953,7 @@ public function seeInFormFields($formSelector, $params) { * ``` * * Additionally, checkbox values can be checked with a boolean. - * + * * ``` php * dontSeeInFormFields('#form-id', [ @@ -2659,21 +2962,24 @@ public function seeInFormFields($formSelector, $params) { * ]); * ?> * ``` - * + * * @param $formSelector * @param $params * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::dontSeeInFormFields() */ - public function cantSeeInFormFields($formSelector, $params) { + public function cantSeeInFormFields($formSelector, $params) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInFormFields', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * * Checks if the array of form parameters (name => value) are not set on the form matched with * the passed selector. - * + * * ``` php * dontSeeInFormFields('form[name=myform]', [ @@ -2682,10 +2988,10 @@ public function cantSeeInFormFields($formSelector, $params) { * ]); * ?> * ``` - * + * * To check that an element hasn't been assigned any one of many values, an array can be passed * as the value: - * + * * ``` php * dontSeeInFormFields('.form-class', [ @@ -2698,7 +3004,7 @@ public function cantSeeInFormFields($formSelector, $params) { * ``` * * Additionally, checkbox values can be checked with a boolean. - * + * * ``` php * dontSeeInFormFields('#form-id', [ @@ -2707,34 +3013,35 @@ public function cantSeeInFormFields($formSelector, $params) { * ]); * ?> * ``` - * + * * @param $formSelector * @param $params + * * @see \Codeception\Lib\InnerBrowser::dontSeeInFormFields() */ - public function dontSeeInFormFields($formSelector, $params) { + public function dontSeeInFormFields($formSelector, $params) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeInFormFields', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * * Submits the given form on the page, optionally with the given form * values. Give the form fields values as an array. * - * Although this function can be used as a short-hand version of - * `fillField()`, `selectOption()`, `click()` etc. it has some important + * Although this function can be used as a short-hand version of + * `fillField()`, `selectOption()`, `click()` etc. it has some important * differences: - * + * * * Only field *names* may be used, not CSS/XPath selectors nor field labels * * If a field is sent to this function that does *not* exist on the page, * it will silently be added to the HTTP request. This is helpful for testing * some types of forms, but be aware that you will *not* get an exception * like you would if you called `fillField()` or `selectOption()` with * a missing field. - * - * Fields that are not provided will be filled by their values from the page, + * + * Fields that are not provided will be filled by their values from the page, * or from any previous calls to `fillField()`, `selectOption()` etc. * You don't need to click the 'Submit' button afterwards. * This command itself triggers the request to form's action. @@ -2797,10 +3104,10 @@ public function dontSeeInFormFields($formSelector, $params) { * ``` * Note that "2" will be the submitted value for the "plan" field, as it is * the selected option. - * + * * You can also emulate a JavaScript submission by not specifying any * buttons in the third parameter to submitForm. - * + * * ```php * submitForm( @@ -2814,10 +3121,10 @@ public function dontSeeInFormFields($formSelector, $params) { * ] * ); * ``` - * - * This function works well when paired with `seeInFormFields()` + * + * This function works well when paired with `seeInFormFields()` * for quickly testing CRUD interfaces and form validation logic. - * + * * ``` php * 'another value', // 'field[]' is already a defined key * ]); * ``` - * + * * The solution is to pass an array value: - * + * * ```php * getScenario()->runStep(new \Codeception\Step\Action('submitForm', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -2909,13 +3217,14 @@ public function submitForm($selector, $params, $button = null) { * * @param $field * @param $value + * * @see \Codeception\Lib\InnerBrowser::fillField() */ - public function fillField($field, $value) { + public function fillField($field, $value) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('fillField', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -2939,13 +3248,14 @@ public function fillField($field, $value) { * * @param $select * @param $option + * * @see \Codeception\Lib\InnerBrowser::selectOption() */ - public function selectOption($select, $option) { + public function selectOption($select, $option) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('selectOption', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -2958,13 +3268,14 @@ public function selectOption($select, $option) { * ``` * * @param $option + * * @see \Codeception\Lib\InnerBrowser::checkOption() */ - public function checkOption($option) { + public function checkOption($option) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('checkOption', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -2977,13 +3288,14 @@ public function checkOption($option) { * ``` * * @param $option + * * @see \Codeception\Lib\InnerBrowser::uncheckOption() */ - public function uncheckOption($option) { + public function uncheckOption($option) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('uncheckOption', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -2998,13 +3310,14 @@ public function uncheckOption($option) { * * @param $field * @param $filename + * * @see \Codeception\Lib\InnerBrowser::attachFile() */ - public function attachFile($field, $filename) { + public function attachFile($field, $filename) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('attachFile', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -3015,13 +3328,14 @@ public function attachFile($field, $filename) { * * @param $uri * @param $params + * * @see \Codeception\Lib\InnerBrowser::sendAjaxGetRequest() */ - public function sendAjaxGetRequest($uri, $params = null) { + public function sendAjaxGetRequest($uri, $params = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('sendAjaxGetRequest', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -3043,13 +3357,14 @@ public function sendAjaxGetRequest($uri, $params = null) { * * @param $uri * @param $params + * * @see \Codeception\Lib\InnerBrowser::sendAjaxPostRequest() */ - public function sendAjaxPostRequest($uri, $params = null) { + public function sendAjaxPostRequest($uri, $params = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('sendAjaxPostRequest', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -3069,13 +3384,14 @@ public function sendAjaxPostRequest($uri, $params = null) { * @param $method * @param $uri * @param $params + * * @see \Codeception\Lib\InnerBrowser::sendAjaxRequest() */ - public function sendAjaxRequest($method, $uri, $params = null) { + public function sendAjaxRequest($method, $uri, $params = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('sendAjaxRequest', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -3093,13 +3409,14 @@ public function sendAjaxRequest($method, $uri, $params = null) { * @param $cssOrXPathOrRegex * * @return mixed + * * @see \Codeception\Lib\InnerBrowser::grabTextFrom() */ - public function grabTextFrom($cssOrXPathOrRegex) { + public function grabTextFrom($cssOrXPathOrRegex) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('grabTextFrom', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -3117,58 +3434,62 @@ public function grabTextFrom($cssOrXPathOrRegex) { * @param $attribute * * @return mixed + * * @see \Codeception\Lib\InnerBrowser::grabAttributeFrom() */ - public function grabAttributeFrom($cssOrXpath, $attribute) { + public function grabAttributeFrom($cssOrXpath, $attribute) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('grabAttributeFrom', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * * Grabs either the text content, or attribute values, of nodes * matched by $cssOrXpath and returns them as an array. - * + * * ```html * First * Second * Third * ``` - * + * * ```php * grabMultiple('a'); - * + * * // would return ['#first', '#second', '#third'] * $aLinks = $I->grabMultiple('a', 'href'); * ?> * ``` - * + * * @param $cssOrXpath * @param $attribute + * * @return string[] + * * @see \Codeception\Lib\InnerBrowser::grabMultiple() */ - public function grabMultiple($cssOrXpath, $attribute = null) { + public function grabMultiple($cssOrXpath, $attribute = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('grabMultiple', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * * @param $field * * @return array|mixed|null|string + * * @see \Codeception\Lib\InnerBrowser::grabValueFrom() */ - public function grabValueFrom($field) { + public function grabValueFrom($field) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('grabValueFrom', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -3186,13 +3507,14 @@ public function grabValueFrom($field) { * @param array $params * * @return mixed + * * @see \Codeception\Lib\InnerBrowser::setCookie() */ - public function setCookie($name, $val, $params = null) { + public function setCookie($name, $val, $params = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('setCookie', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -3200,16 +3522,17 @@ public function setCookie($name, $val, $params = null) { * You can set additional cookie params like `domain`, `path` in array passed as last argument. * * @param $cookie - * * @param array $params + * * @return mixed + * * @see \Codeception\Lib\InnerBrowser::grabCookie() */ - public function grabCookie($cookie, $params = null) { + public function grabCookie($cookie, $params = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('grabCookie', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -3224,13 +3547,17 @@ public function grabCookie($cookie, $params = null) { * * @param $cookie * @param array $params + * * @return mixed - * Conditional Assertion: Test won't be stopped on fail + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::seeCookie() */ - public function canSeeCookie($cookie, $params = null) { + public function canSeeCookie($cookie, $params = null) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeCookie', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -3245,14 +3572,16 @@ public function canSeeCookie($cookie, $params = null) { * * @param $cookie * @param array $params + * * @return mixed + * * @see \Codeception\Lib\InnerBrowser::seeCookie() */ - public function seeCookie($cookie, $params = null) { + public function seeCookie($cookie, $params = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeCookie', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -3260,15 +3589,18 @@ public function seeCookie($cookie, $params = null) { * You can set additional cookie params like `domain`, `path` as array passed in last argument. * * @param $cookie - * * @param array $params + * * @return mixed - * Conditional Assertion: Test won't be stopped on fail + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::dontSeeCookie() */ - public function cantSeeCookie($cookie, $params = null) { + public function cantSeeCookie($cookie, $params = null) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeCookie', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -3276,16 +3608,17 @@ public function cantSeeCookie($cookie, $params = null) { * You can set additional cookie params like `domain`, `path` as array passed in last argument. * * @param $cookie - * * @param array $params + * * @return mixed + * * @see \Codeception\Lib\InnerBrowser::dontSeeCookie() */ - public function dontSeeCookie($cookie, $params = null) { + public function dontSeeCookie($cookie, $params = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeCookie', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -3293,16 +3626,17 @@ public function dontSeeCookie($cookie, $params = null) { * You can set additional cookie params like `domain`, `path` in array passed as last argument. * * @param $cookie - * * @param array $params + * * @return mixed + * * @see \Codeception\Lib\InnerBrowser::resetCookie() */ - public function resetCookie($name, $params = null) { + public function resetCookie($name, $params = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('resetCookie', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -3323,13 +3657,17 @@ public function resetCookie($name, $params = null) { * * @param $selector * @param array $attributes + * * @return * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::seeElement() */ - public function canSeeElement($selector, $attributes = null) { + public function canSeeElement($selector, $attributes = null) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeElement', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -3350,14 +3688,16 @@ public function canSeeElement($selector, $attributes = null) { * * @param $selector * @param array $attributes + * * @return + * * @see \Codeception\Lib\InnerBrowser::seeElement() */ - public function seeElement($selector, $attributes = null) { + public function seeElement($selector, $attributes = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeElement', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -3375,12 +3715,15 @@ public function seeElement($selector, $attributes = null) { * * @param $selector * @param array $attributes - * Conditional Assertion: Test won't be stopped on fail + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::dontSeeElement() */ - public function cantSeeElement($selector, $attributes = null) { + public function cantSeeElement($selector, $attributes = null) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeElement', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -3398,13 +3741,14 @@ public function cantSeeElement($selector, $attributes = null) { * * @param $selector * @param array $attributes + * * @see \Codeception\Lib\InnerBrowser::dontSeeElement() */ - public function dontSeeElement($selector, $attributes = null) { + public function dontSeeElement($selector, $attributes = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeElement', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -3416,16 +3760,20 @@ public function dontSeeElement($selector, $attributes = null) { * $I->seeNumberOfElements('tr', [0,10]); //between 0 and 10 elements * ?> * ``` + * * @param $selector * @param mixed $expected : - * - string: strict number - * - array: range of numbers [0,10] - * Conditional Assertion: Test won't be stopped on fail + * - string: strict number + * - array: range of numbers [0,10] + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::seeNumberOfElements() */ - public function canSeeNumberOfElements($selector, $expected) { + public function canSeeNumberOfElements($selector, $expected) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeNumberOfElements', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -3437,17 +3785,19 @@ public function canSeeNumberOfElements($selector, $expected) { * $I->seeNumberOfElements('tr', [0,10]); //between 0 and 10 elements * ?> * ``` + * * @param $selector * @param mixed $expected : - * - string: strict number - * - array: range of numbers [0,10] + * - string: strict number + * - array: range of numbers [0,10] + * * @see \Codeception\Lib\InnerBrowser::seeNumberOfElements() */ - public function seeNumberOfElements($selector, $expected) { + public function seeNumberOfElements($selector, $expected) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeNumberOfElements', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -3463,12 +3813,15 @@ public function seeNumberOfElements($selector, $expected) { * @param $optionText * * @return mixed - * Conditional Assertion: Test won't be stopped on fail + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::seeOptionIsSelected() */ - public function canSeeOptionIsSelected($selector, $optionText) { + public function canSeeOptionIsSelected($selector, $optionText) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeOptionIsSelected', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -3484,13 +3837,14 @@ public function canSeeOptionIsSelected($selector, $optionText) { * @param $optionText * * @return mixed + * * @see \Codeception\Lib\InnerBrowser::seeOptionIsSelected() */ - public function seeOptionIsSelected($selector, $optionText) { + public function seeOptionIsSelected($selector, $optionText) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeOptionIsSelected', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -3506,12 +3860,15 @@ public function seeOptionIsSelected($selector, $optionText) { * @param $optionText * * @return mixed - * Conditional Assertion: Test won't be stopped on fail + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::dontSeeOptionIsSelected() */ - public function cantSeeOptionIsSelected($selector, $optionText) { + public function cantSeeOptionIsSelected($selector, $optionText) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeOptionIsSelected', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -3527,34 +3884,39 @@ public function cantSeeOptionIsSelected($selector, $optionText) { * @param $optionText * * @return mixed + * * @see \Codeception\Lib\InnerBrowser::dontSeeOptionIsSelected() */ - public function dontSeeOptionIsSelected($selector, $optionText) { + public function dontSeeOptionIsSelected($selector, $optionText) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeOptionIsSelected', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * * Asserts that current page has 404 response status code. * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::seePageNotFound() */ - public function canSeePageNotFound() { + public function canSeePageNotFound() + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seePageNotFound', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * * Asserts that current page has 404 response status code. + * * @see \Codeception\Lib\InnerBrowser::seePageNotFound() */ - public function seePageNotFound() { + public function seePageNotFound() + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seePageNotFound', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -3563,12 +3925,15 @@ public function seePageNotFound() { * @param $code * * @return mixed - * Conditional Assertion: Test won't be stopped on fail + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::seeResponseCodeIs() */ - public function canSeeResponseCodeIs($code) { + public function canSeeResponseCodeIs($code) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeResponseCodeIs', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -3577,13 +3942,14 @@ public function canSeeResponseCodeIs($code) { * @param $code * * @return mixed + * * @see \Codeception\Lib\InnerBrowser::seeResponseCodeIs() */ - public function seeResponseCodeIs($code) { + public function seeResponseCodeIs($code) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeResponseCodeIs', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -3598,12 +3964,15 @@ public function seeResponseCodeIs($code) { * @param $title * * @return mixed - * Conditional Assertion: Test won't be stopped on fail + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::seeInTitle() */ - public function canSeeInTitle($title) { + public function canSeeInTitle($title) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeInTitle', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -3618,13 +3987,14 @@ public function canSeeInTitle($title) { * @param $title * * @return mixed + * * @see \Codeception\Lib\InnerBrowser::seeInTitle() */ - public function seeInTitle($title) { + public function seeInTitle($title) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeInTitle', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -3633,12 +4003,15 @@ public function seeInTitle($title) { * @param $title * * @return mixed - * Conditional Assertion: Test won't be stopped on fail + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::dontSeeInTitle() */ - public function cantSeeInTitle($title) { + public function cantSeeInTitle($title) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInTitle', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -3647,13 +4020,14 @@ public function cantSeeInTitle($title) { * @param $title * * @return mixed + * * @see \Codeception\Lib\InnerBrowser::dontSeeInTitle() */ - public function dontSeeInTitle($title) { + public function dontSeeInTitle($title) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeInTitle', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -3671,22 +4045,25 @@ public function dontSeeInTitle($title) { * ``` * * @param string $name + * * @see \Codeception\Lib\InnerBrowser::switchToIframe() */ - public function switchToIframe($name) { + public function switchToIframe($name) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('switchToIframe', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * * Moves back in history. - * + * * @param int $numberOfSteps (default value 1) + * * @see \Codeception\Lib\InnerBrowser::moveBack() */ - public function moveBack($numberOfSteps = null) { + public function moveBack($numberOfSteps = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('moveBack', func_get_args())); } } diff --git a/tests/_support/_generated/UnitTesterActions.php b/tests/_support/_generated/UnitTesterActions.php index d8eba34..1974067 100644 --- a/tests/_support/_generated/UnitTesterActions.php +++ b/tests/_support/_generated/UnitTesterActions.php @@ -1,12 +1,12 @@ -getScenario()->runStep(new \Codeception\Step\Action('assertEquals', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -41,13 +41,14 @@ public function assertEquals($expected, $actual, $message = null) { * @param $expected * @param $actual * @param string $message + * * @see \Codeception\Module\Asserts::assertNotEquals() */ - public function assertNotEquals($expected, $actual, $message = null) { + public function assertNotEquals($expected, $actual, $message = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotEquals', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -58,13 +59,14 @@ public function assertNotEquals($expected, $actual, $message = null) { * @param string $message * * @return mixed + * * @see \Codeception\Module\Asserts::assertSame() */ - public function assertSame($expected, $actual, $message = null) { + public function assertSame($expected, $actual, $message = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('assertSame', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -73,13 +75,14 @@ public function assertSame($expected, $actual, $message = null) { * @param $expected * @param $actual * @param string $message + * * @see \Codeception\Module\Asserts::assertNotSame() */ - public function assertNotSame($expected, $actual, $message = null) { + public function assertNotSame($expected, $actual, $message = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotSame', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -88,24 +91,25 @@ public function assertNotSame($expected, $actual, $message = null) { * @param $expected * @param $actual * @param string $message + * * @see \Codeception\Module\Asserts::assertGreaterThan() */ - public function assertGreaterThan($expected, $actual, $message = null) { + public function assertGreaterThan($expected, $actual, $message = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('assertGreaterThan', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * * @deprecated * @see \Codeception\Module\Asserts::assertGreaterThen() */ - public function assertGreaterThen($expected, $actual, $message = null) { + public function assertGreaterThen($expected, $actual, $message = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('assertGreaterThen', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -114,24 +118,25 @@ public function assertGreaterThen($expected, $actual, $message = null) { * @param $expected * @param $actual * @param string $message + * * @see \Codeception\Module\Asserts::assertGreaterThanOrEqual() */ - public function assertGreaterThanOrEqual($expected, $actual, $message = null) { + public function assertGreaterThanOrEqual($expected, $actual, $message = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('assertGreaterThanOrEqual', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * * @deprecated * @see \Codeception\Module\Asserts::assertGreaterThenOrEqual() */ - public function assertGreaterThenOrEqual($expected, $actual, $message = null) { + public function assertGreaterThenOrEqual($expected, $actual, $message = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('assertGreaterThenOrEqual', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -140,13 +145,14 @@ public function assertGreaterThenOrEqual($expected, $actual, $message = null) { * @param $expected * @param $actual * @param string $message + * * @see \Codeception\Module\Asserts::assertLessThan() */ - public function assertLessThan($expected, $actual, $message = null) { + public function assertLessThan($expected, $actual, $message = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('assertLessThan', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -155,13 +161,14 @@ public function assertLessThan($expected, $actual, $message = null) { * @param $expected * @param $actual * @param string $message + * * @see \Codeception\Module\Asserts::assertLessThanOrEqual() */ - public function assertLessThanOrEqual($expected, $actual, $message = null) { + public function assertLessThanOrEqual($expected, $actual, $message = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('assertLessThanOrEqual', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -170,13 +177,14 @@ public function assertLessThanOrEqual($expected, $actual, $message = null) { * @param $needle * @param $haystack * @param string $message + * * @see \Codeception\Module\Asserts::assertContains() */ - public function assertContains($needle, $haystack, $message = null) { + public function assertContains($needle, $haystack, $message = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('assertContains', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -185,13 +193,14 @@ public function assertContains($needle, $haystack, $message = null) { * @param $needle * @param $haystack * @param string $message + * * @see \Codeception\Module\Asserts::assertNotContains() */ - public function assertNotContains($needle, $haystack, $message = null) { + public function assertNotContains($needle, $haystack, $message = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotContains', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -200,13 +209,14 @@ public function assertNotContains($needle, $haystack, $message = null) { * @param string $pattern * @param string $string * @param string $message + * * @see \Codeception\Module\Asserts::assertRegExp() */ - public function assertRegExp($pattern, $string, $message = null) { + public function assertRegExp($pattern, $string, $message = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('assertRegExp', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -215,13 +225,14 @@ public function assertRegExp($pattern, $string, $message = null) { * @param string $pattern * @param string $string * @param string $message + * * @see \Codeception\Module\Asserts::assertNotRegExp() */ - public function assertNotRegExp($pattern, $string, $message = null) { + public function assertNotRegExp($pattern, $string, $message = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotRegExp', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -229,13 +240,14 @@ public function assertNotRegExp($pattern, $string, $message = null) { * * @param $actual * @param string $message + * * @see \Codeception\Module\Asserts::assertEmpty() */ - public function assertEmpty($actual, $message = null) { + public function assertEmpty($actual, $message = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('assertEmpty', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -243,13 +255,14 @@ public function assertEmpty($actual, $message = null) { * * @param $actual * @param string $message + * * @see \Codeception\Module\Asserts::assertNotEmpty() */ - public function assertNotEmpty($actual, $message = null) { + public function assertNotEmpty($actual, $message = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotEmpty', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -257,13 +270,14 @@ public function assertNotEmpty($actual, $message = null) { * * @param $actual * @param string $message + * * @see \Codeception\Module\Asserts::assertNull() */ - public function assertNull($actual, $message = null) { + public function assertNull($actual, $message = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNull', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -271,13 +285,14 @@ public function assertNull($actual, $message = null) { * * @param $actual * @param string $message + * * @see \Codeception\Module\Asserts::assertNotNull() */ - public function assertNotNull($actual, $message = null) { + public function assertNotNull($actual, $message = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotNull', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -285,13 +300,14 @@ public function assertNotNull($actual, $message = null) { * * @param $condition * @param string $message + * * @see \Codeception\Module\Asserts::assertTrue() */ - public function assertTrue($condition, $message = null) { + public function assertTrue($condition, $message = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('assertTrue', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -299,50 +315,55 @@ public function assertTrue($condition, $message = null) { * * @param $condition * @param string $message + * * @see \Codeception\Module\Asserts::assertFalse() */ - public function assertFalse($condition, $message = null) { + public function assertFalse($condition, $message = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFalse', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * * Checks if file exists - * + * * @param string $filename * @param string $message + * * @see \Codeception\Module\Asserts::assertFileExists() */ - public function assertFileExists($filename, $message = null) { + public function assertFileExists($filename, $message = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileExists', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * * Checks if file doesn't exist - * + * * @param string $filename * @param string $message + * * @see \Codeception\Module\Asserts::assertFileNotExists() */ - public function assertFileNotExists($filename, $message = null) { + public function assertFileNotExists($filename, $message = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileNotExists', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * * Fails the test with message. * * @param $message + * * @see \Codeception\Module\Asserts::fail() */ - public function fail($message) { + public function fail($message) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('fail', func_get_args())); } } diff --git a/tests/acceptance/AcceptanceTester.php b/tests/acceptance/AcceptanceTester.php index 487202e..c583705 100644 --- a/tests/acceptance/AcceptanceTester.php +++ b/tests/acceptance/AcceptanceTester.php @@ -1,4 +1,6 @@ - * ``` * - * @param string $name the name of the request header + * @param string $name the name of the request header * @param string $value the value to set it to for subsequent - * requests + * requests + * * @see \Codeception\Module\PhpBrowser::setHeader() */ - public function setHeader($name, $value) { + public function setHeader($name, $value) + { return $this->scenario->runStep(new \Codeception\Step\Action('setHeader', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -66,15 +68,16 @@ public function setHeader($name, $value) { * $I->amOnPage('some-other-page.php'); * ?> * ``` - * + * * @param string $name the name of the header to delete. + * * @see \Codeception\Module\PhpBrowser::deleteHeader() */ - public function deleteHeader($name) { + public function deleteHeader($name) + { return $this->scenario->runStep(new \Codeception\Step\Action('deleteHeader', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -82,13 +85,14 @@ public function deleteHeader($name) { * * @param $username * @param $password + * * @see \Codeception\Module\PhpBrowser::amHttpAuthenticated() */ - public function amHttpAuthenticated($username, $password) { + public function amHttpAuthenticated($username, $password) + { return $this->scenario->runStep(new \Codeception\Step\Condition('amHttpAuthenticated', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -104,13 +108,14 @@ public function amHttpAuthenticated($username, $password) { * ``` * * @param $page + * * @see \Codeception\Module\PhpBrowser::amOnPage() */ - public function amOnPage($page) { + public function amOnPage($page) + { return $this->scenario->runStep(new \Codeception\Step\Condition('amOnPage', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -122,13 +127,14 @@ public function amOnPage($page) { * $I->amOnPage('/quickstart'); // moves to http://codeception.com/quickstart * ?> * ``` + * * @see \Codeception\Module\PhpBrowser::amOnUrl() */ - public function amOnUrl($url) { + public function amOnUrl($url) + { return $this->scenario->runStep(new \Codeception\Step\Condition('amOnUrl', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -150,13 +156,14 @@ public function amOnUrl($url) { * @param $subdomain * * @return mixed + * * @see \Codeception\Module\PhpBrowser::amOnSubdomain() */ - public function amOnSubdomain($subdomain) { + public function amOnSubdomain($subdomain) + { return $this->scenario->runStep(new \Codeception\Step\Condition('amOnSubdomain', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -177,13 +184,14 @@ public function amOnSubdomain($subdomain) { * If Codeception lacks important Guzzle Client methods, implement them and submit patches. * * @param callable $function + * * @see \Codeception\Module\PhpBrowser::executeInGuzzle() */ - public function executeInGuzzle($function) { + public function executeInGuzzle($function) + { return $this->scenario->runStep(new \Codeception\Step\Action('executeInGuzzle', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -216,13 +224,14 @@ public function executeInGuzzle($function) { * * @param $link * @param $context + * * @see \Codeception\Lib\InnerBrowser::click() */ - public function click($link, $context = null) { + public function click($link, $context = null) + { return $this->scenario->runStep(new \Codeception\Step\Action('click', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -239,12 +248,15 @@ public function click($link, $context = null) { * * @param $text * @param null $selector - * Conditional Assertion: Test won't be stopped on fail + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::see() */ - public function canSee($text, $selector = null) { + public function canSee($text, $selector = null) + { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('see', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -261,13 +273,14 @@ public function canSee($text, $selector = null) { * * @param $text * @param null $selector + * * @see \Codeception\Lib\InnerBrowser::see() */ - public function see($text, $selector = null) { + public function see($text, $selector = null) + { return $this->scenario->runStep(new \Codeception\Step\Assertion('see', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -284,12 +297,15 @@ public function see($text, $selector = null) { * * @param $text * @param null $selector - * Conditional Assertion: Test won't be stopped on fail + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::dontSee() */ - public function cantSee($text, $selector = null) { + public function cantSee($text, $selector = null) + { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSee', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -306,13 +322,14 @@ public function cantSee($text, $selector = null) { * * @param $text * @param null $selector + * * @see \Codeception\Lib\InnerBrowser::dontSee() */ - public function dontSee($text, $selector = null) { + public function dontSee($text, $selector = null) + { return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSee', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -328,12 +345,15 @@ public function dontSee($text, $selector = null) { * * @param $text * @param null $url - * Conditional Assertion: Test won't be stopped on fail + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::seeLink() */ - public function canSeeLink($text, $url = null) { + public function canSeeLink($text, $url = null) + { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeLink', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -349,13 +369,14 @@ public function canSeeLink($text, $url = null) { * * @param $text * @param null $url + * * @see \Codeception\Lib\InnerBrowser::seeLink() */ - public function seeLink($text, $url = null) { + public function seeLink($text, $url = null) + { return $this->scenario->runStep(new \Codeception\Step\Assertion('seeLink', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -371,12 +392,15 @@ public function seeLink($text, $url = null) { * * @param $text * @param null $url - * Conditional Assertion: Test won't be stopped on fail + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::dontSeeLink() */ - public function cantSeeLink($text, $url = null) { + public function cantSeeLink($text, $url = null) + { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeLink', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -392,13 +416,14 @@ public function cantSeeLink($text, $url = null) { * * @param $text * @param null $url + * * @see \Codeception\Lib\InnerBrowser::dontSeeLink() */ - public function dontSeeLink($text, $url = null) { + public function dontSeeLink($text, $url = null) + { return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeLink', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -415,11 +440,14 @@ public function dontSeeLink($text, $url = null) { * * @param $uri * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::seeInCurrentUrl() */ - public function canSeeInCurrentUrl($uri) { + public function canSeeInCurrentUrl($uri) + { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeInCurrentUrl', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -435,13 +463,14 @@ public function canSeeInCurrentUrl($uri) { * ``` * * @param $uri + * * @see \Codeception\Lib\InnerBrowser::seeInCurrentUrl() */ - public function seeInCurrentUrl($uri) { + public function seeInCurrentUrl($uri) + { return $this->scenario->runStep(new \Codeception\Step\Assertion('seeInCurrentUrl', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -455,11 +484,14 @@ public function seeInCurrentUrl($uri) { * * @param $uri * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::dontSeeInCurrentUrl() */ - public function cantSeeInCurrentUrl($uri) { + public function cantSeeInCurrentUrl($uri) + { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInCurrentUrl', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -472,13 +504,14 @@ public function cantSeeInCurrentUrl($uri) { * ``` * * @param $uri + * * @see \Codeception\Lib\InnerBrowser::dontSeeInCurrentUrl() */ - public function dontSeeInCurrentUrl($uri) { + public function dontSeeInCurrentUrl($uri) + { return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeInCurrentUrl', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -494,11 +527,14 @@ public function dontSeeInCurrentUrl($uri) { * * @param $uri * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::seeCurrentUrlEquals() */ - public function canSeeCurrentUrlEquals($uri) { + public function canSeeCurrentUrlEquals($uri) + { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeCurrentUrlEquals', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -513,13 +549,14 @@ public function canSeeCurrentUrlEquals($uri) { * ``` * * @param $uri + * * @see \Codeception\Lib\InnerBrowser::seeCurrentUrlEquals() */ - public function seeCurrentUrlEquals($uri) { + public function seeCurrentUrlEquals($uri) + { return $this->scenario->runStep(new \Codeception\Step\Assertion('seeCurrentUrlEquals', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -535,11 +572,14 @@ public function seeCurrentUrlEquals($uri) { * * @param $uri * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::dontSeeCurrentUrlEquals() */ - public function cantSeeCurrentUrlEquals($uri) { + public function cantSeeCurrentUrlEquals($uri) + { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeCurrentUrlEquals', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -554,13 +594,14 @@ public function cantSeeCurrentUrlEquals($uri) { * ``` * * @param $uri + * * @see \Codeception\Lib\InnerBrowser::dontSeeCurrentUrlEquals() */ - public function dontSeeCurrentUrlEquals($uri) { + public function dontSeeCurrentUrlEquals($uri) + { return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeCurrentUrlEquals', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -575,11 +616,14 @@ public function dontSeeCurrentUrlEquals($uri) { * * @param $uri * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::seeCurrentUrlMatches() */ - public function canSeeCurrentUrlMatches($uri) { + public function canSeeCurrentUrlMatches($uri) + { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeCurrentUrlMatches', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -593,13 +637,14 @@ public function canSeeCurrentUrlMatches($uri) { * ``` * * @param $uri + * * @see \Codeception\Lib\InnerBrowser::seeCurrentUrlMatches() */ - public function seeCurrentUrlMatches($uri) { + public function seeCurrentUrlMatches($uri) + { return $this->scenario->runStep(new \Codeception\Step\Assertion('seeCurrentUrlMatches', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -614,11 +659,14 @@ public function seeCurrentUrlMatches($uri) { * * @param $uri * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::dontSeeCurrentUrlMatches() */ - public function cantSeeCurrentUrlMatches($uri) { + public function cantSeeCurrentUrlMatches($uri) + { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeCurrentUrlMatches', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -632,13 +680,14 @@ public function cantSeeCurrentUrlMatches($uri) { * ``` * * @param $uri + * * @see \Codeception\Lib\InnerBrowser::dontSeeCurrentUrlMatches() */ - public function dontSeeCurrentUrlMatches($uri) { + public function dontSeeCurrentUrlMatches($uri) + { return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeCurrentUrlMatches', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -655,14 +704,16 @@ public function dontSeeCurrentUrlMatches($uri) { * @param null $uri * * @internal param $url + * * @return mixed + * * @see \Codeception\Lib\InnerBrowser::grabFromCurrentUrl() */ - public function grabFromCurrentUrl($uri = null) { + public function grabFromCurrentUrl($uri = null) + { return $this->scenario->runStep(new \Codeception\Step\Action('grabFromCurrentUrl', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -678,11 +729,14 @@ public function grabFromCurrentUrl($uri = null) { * * @param $checkbox * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::seeCheckboxIsChecked() */ - public function canSeeCheckboxIsChecked($checkbox) { + public function canSeeCheckboxIsChecked($checkbox) + { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeCheckboxIsChecked', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -697,13 +751,14 @@ public function canSeeCheckboxIsChecked($checkbox) { * ``` * * @param $checkbox + * * @see \Codeception\Lib\InnerBrowser::seeCheckboxIsChecked() */ - public function seeCheckboxIsChecked($checkbox) { + public function seeCheckboxIsChecked($checkbox) + { return $this->scenario->runStep(new \Codeception\Step\Assertion('seeCheckboxIsChecked', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -718,11 +773,14 @@ public function seeCheckboxIsChecked($checkbox) { * * @param $checkbox * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::dontSeeCheckboxIsChecked() */ - public function cantSeeCheckboxIsChecked($checkbox) { + public function cantSeeCheckboxIsChecked($checkbox) + { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeCheckboxIsChecked', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -736,17 +794,18 @@ public function cantSeeCheckboxIsChecked($checkbox) { * ``` * * @param $checkbox + * * @see \Codeception\Lib\InnerBrowser::dontSeeCheckboxIsChecked() */ - public function dontSeeCheckboxIsChecked($checkbox) { + public function dontSeeCheckboxIsChecked($checkbox) + { return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeCheckboxIsChecked', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * - * Checks that the given input field or textarea contains the given value. + * Checks that the given input field or textarea contains the given value. * For fuzzy locators, fields are matched by label text, the "name" attribute, CSS, and XPath. * * ``` php @@ -763,15 +822,18 @@ public function dontSeeCheckboxIsChecked($checkbox) { * @param $field * @param $value * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::seeInField() */ - public function canSeeInField($field, $value) { + public function canSeeInField($field, $value) + { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeInField', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * - * Checks that the given input field or textarea contains the given value. + * Checks that the given input field or textarea contains the given value. * For fuzzy locators, fields are matched by label text, the "name" attribute, CSS, and XPath. * * ``` php @@ -787,13 +849,14 @@ public function canSeeInField($field, $value) { * * @param $field * @param $value + * * @see \Codeception\Lib\InnerBrowser::seeInField() */ - public function seeInField($field, $value) { + public function seeInField($field, $value) + { return $this->scenario->runStep(new \Codeception\Step\Assertion('seeInField', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -814,11 +877,14 @@ public function seeInField($field, $value) { * @param $field * @param $value * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::dontSeeInField() */ - public function cantSeeInField($field, $value) { + public function cantSeeInField($field, $value) + { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInField', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -838,19 +904,20 @@ public function cantSeeInField($field, $value) { * * @param $field * @param $value + * * @see \Codeception\Lib\InnerBrowser::dontSeeInField() */ - public function dontSeeInField($field, $value) { + public function dontSeeInField($field, $value) + { return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeInField', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * * Checks if the array of form parameters (name => value) are set on the form matched with the * passed selector. - * + * * ``` php * seeInFormFields('form[name=myform]', [ @@ -859,10 +926,10 @@ public function dontSeeInField($field, $value) { * ]); * ?> * ``` - * + * * For multi-select elements, or to check values of multiple elements with the same name, an * array may be passed: - * + * * ``` php * seeInFormFields('.form-class', [ @@ -879,7 +946,7 @@ public function dontSeeInField($field, $value) { * ``` * * Additionally, checkbox values can be checked with a boolean. - * + * * ``` php * seeInFormFields('#form-id', [ @@ -888,9 +955,9 @@ public function dontSeeInField($field, $value) { * ]); * ?> * ``` - * + * * Pair this with submitForm for quick testing magic. - * + * * ``` php * seeInFormFields('//form[@id=my-form]', $form); * ?> * ``` - * + * * @param $formSelector * @param $params * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::seeInFormFields() */ - public function canSeeInFormFields($formSelector, $params) { + public function canSeeInFormFields($formSelector, $params) + { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeInFormFields', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * * Checks if the array of form parameters (name => value) are set on the form matched with the * passed selector. - * + * * ``` php * seeInFormFields('form[name=myform]', [ @@ -927,10 +997,10 @@ public function canSeeInFormFields($formSelector, $params) { * ]); * ?> * ``` - * + * * For multi-select elements, or to check values of multiple elements with the same name, an * array may be passed: - * + * * ``` php * seeInFormFields('.form-class', [ @@ -947,7 +1017,7 @@ public function canSeeInFormFields($formSelector, $params) { * ``` * * Additionally, checkbox values can be checked with a boolean. - * + * * ``` php * seeInFormFields('#form-id', [ @@ -956,9 +1026,9 @@ public function canSeeInFormFields($formSelector, $params) { * ]); * ?> * ``` - * + * * Pair this with submitForm for quick testing magic. - * + * * ``` php * seeInFormFields('//form[@id=my-form]', $form); * ?> * ``` - * + * * @param $formSelector * @param $params + * * @see \Codeception\Lib\InnerBrowser::seeInFormFields() */ - public function seeInFormFields($formSelector, $params) { + public function seeInFormFields($formSelector, $params) + { return $this->scenario->runStep(new \Codeception\Step\Assertion('seeInFormFields', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * * Checks if the array of form parameters (name => value) are not set on the form matched with * the passed selector. - * + * * ``` php * dontSeeInFormFields('form[name=myform]', [ @@ -996,10 +1067,10 @@ public function seeInFormFields($formSelector, $params) { * ]); * ?> * ``` - * + * * To check that an element hasn't been assigned any one of many values, an array can be passed * as the value: - * + * * ``` php * dontSeeInFormFields('.form-class', [ @@ -1012,7 +1083,7 @@ public function seeInFormFields($formSelector, $params) { * ``` * * Additionally, checkbox values can be checked with a boolean. - * + * * ``` php * dontSeeInFormFields('#form-id', [ @@ -1021,21 +1092,24 @@ public function seeInFormFields($formSelector, $params) { * ]); * ?> * ``` - * + * * @param $formSelector * @param $params * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::dontSeeInFormFields() */ - public function cantSeeInFormFields($formSelector, $params) { + public function cantSeeInFormFields($formSelector, $params) + { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInFormFields', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * * Checks if the array of form parameters (name => value) are not set on the form matched with * the passed selector. - * + * * ``` php * dontSeeInFormFields('form[name=myform]', [ @@ -1044,10 +1118,10 @@ public function cantSeeInFormFields($formSelector, $params) { * ]); * ?> * ``` - * + * * To check that an element hasn't been assigned any one of many values, an array can be passed * as the value: - * + * * ``` php * dontSeeInFormFields('.form-class', [ @@ -1060,7 +1134,7 @@ public function cantSeeInFormFields($formSelector, $params) { * ``` * * Additionally, checkbox values can be checked with a boolean. - * + * * ``` php * dontSeeInFormFields('#form-id', [ @@ -1069,16 +1143,17 @@ public function cantSeeInFormFields($formSelector, $params) { * ]); * ?> * ``` - * + * * @param $formSelector * @param $params + * * @see \Codeception\Lib\InnerBrowser::dontSeeInFormFields() */ - public function dontSeeInFormFields($formSelector, $params) { + public function dontSeeInFormFields($formSelector, $params) + { return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeInFormFields', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1093,7 +1168,7 @@ public function dontSeeInFormFields($formSelector, $params) { * in the request with the last parameter as an alternative to * explicitly setting its value in the second parameter, as * button values are not otherwise included in the request. - * + * * Examples: * * ``` php @@ -1124,17 +1199,17 @@ public function dontSeeInFormFields($formSelector, $params) { * * ``` * Note that "2" will be the submitted value for the "plan" field, as it is the selected option. - * + * * You can also emulate a JavaScript submission by not specifying any buttons in the third parameter to submitForm. - * + * * ```php * submitForm('#userForm', array('user' => array('login' => 'Davert', 'password' => '123456', 'agree' => true))); - * + * * ``` - * + * * Pair this with seeInFormFields for quick testing magic. - * + * * ``` php * scenario->runStep(new \Codeception\Step\Action('submitForm', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1202,13 +1278,14 @@ public function submitForm($selector, $params, $button = null) { * * @param $field * @param $value + * * @see \Codeception\Lib\InnerBrowser::fillField() */ - public function fillField($field, $value) { + public function fillField($field, $value) + { return $this->scenario->runStep(new \Codeception\Step\Action('fillField', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1232,13 +1309,14 @@ public function fillField($field, $value) { * * @param $select * @param $option + * * @see \Codeception\Lib\InnerBrowser::selectOption() */ - public function selectOption($select, $option) { + public function selectOption($select, $option) + { return $this->scenario->runStep(new \Codeception\Step\Action('selectOption', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1251,13 +1329,14 @@ public function selectOption($select, $option) { * ``` * * @param $option + * * @see \Codeception\Lib\InnerBrowser::checkOption() */ - public function checkOption($option) { + public function checkOption($option) + { return $this->scenario->runStep(new \Codeception\Step\Action('checkOption', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1270,13 +1349,14 @@ public function checkOption($option) { * ``` * * @param $option + * * @see \Codeception\Lib\InnerBrowser::uncheckOption() */ - public function uncheckOption($option) { + public function uncheckOption($option) + { return $this->scenario->runStep(new \Codeception\Step\Action('uncheckOption', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1291,13 +1371,14 @@ public function uncheckOption($option) { * * @param $field * @param $filename + * * @see \Codeception\Lib\InnerBrowser::attachFile() */ - public function attachFile($field, $filename) { + public function attachFile($field, $filename) + { return $this->scenario->runStep(new \Codeception\Step\Action('attachFile', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1308,13 +1389,14 @@ public function attachFile($field, $filename) { * * @param $uri * @param $params + * * @see \Codeception\Lib\InnerBrowser::sendAjaxGetRequest() */ - public function sendAjaxGetRequest($uri, $params = null) { + public function sendAjaxGetRequest($uri, $params = null) + { return $this->scenario->runStep(new \Codeception\Step\Action('sendAjaxGetRequest', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1336,13 +1418,14 @@ public function sendAjaxGetRequest($uri, $params = null) { * * @param $uri * @param $params + * * @see \Codeception\Lib\InnerBrowser::sendAjaxPostRequest() */ - public function sendAjaxPostRequest($uri, $params = null) { + public function sendAjaxPostRequest($uri, $params = null) + { return $this->scenario->runStep(new \Codeception\Step\Action('sendAjaxPostRequest', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1362,13 +1445,14 @@ public function sendAjaxPostRequest($uri, $params = null) { * @param $method * @param $uri * @param $params + * * @see \Codeception\Lib\InnerBrowser::sendAjaxRequest() */ - public function sendAjaxRequest($method, $uri, $params = null) { + public function sendAjaxRequest($method, $uri, $params = null) + { return $this->scenario->runStep(new \Codeception\Step\Action('sendAjaxRequest', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1386,13 +1470,14 @@ public function sendAjaxRequest($method, $uri, $params = null) { * @param $cssOrXPathOrRegex * * @return mixed + * * @see \Codeception\Lib\InnerBrowser::grabTextFrom() */ - public function grabTextFrom($cssOrXPathOrRegex) { + public function grabTextFrom($cssOrXPathOrRegex) + { return $this->scenario->runStep(new \Codeception\Step\Action('grabTextFrom', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1408,28 +1493,32 @@ public function grabTextFrom($cssOrXPathOrRegex) { * * @param $cssOrXpath * @param $attribute + * * @internal param $element + * * @return mixed + * * @see \Codeception\Lib\InnerBrowser::grabAttributeFrom() */ - public function grabAttributeFrom($cssOrXpath, $attribute) { + public function grabAttributeFrom($cssOrXpath, $attribute) + { return $this->scenario->runStep(new \Codeception\Step\Action('grabAttributeFrom', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * * @param $field * * @return array|mixed|null|string + * * @see \Codeception\Lib\InnerBrowser::grabValueFrom() */ - public function grabValueFrom($field) { + public function grabValueFrom($field) + { return $this->scenario->runStep(new \Codeception\Step\Action('grabValueFrom', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1445,17 +1534,19 @@ public function grabValueFrom($field) { * @param $name * @param $val * @param array $params + * * @internal param $cookie * @internal param $value * * @return mixed + * * @see \Codeception\Lib\InnerBrowser::setCookie() */ - public function setCookie($name, $val, $params = null) { + public function setCookie($name, $val, $params = null) + { return $this->scenario->runStep(new \Codeception\Step\Action('setCookie', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1463,16 +1554,17 @@ public function setCookie($name, $val, $params = null) { * You can set additional cookie params like `domain`, `path` in array passed as last argument. * * @param $cookie - * * @param array $params + * * @return mixed + * * @see \Codeception\Lib\InnerBrowser::grabCookie() */ - public function grabCookie($name, $params = null) { + public function grabCookie($name, $params = null) + { return $this->scenario->runStep(new \Codeception\Step\Action('grabCookie', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1487,13 +1579,17 @@ public function grabCookie($name, $params = null) { * * @param $cookie * @param array $params + * * @return mixed - * Conditional Assertion: Test won't be stopped on fail + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::seeCookie() */ - public function canSeeCookie($name, $params = null) { + public function canSeeCookie($name, $params = null) + { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeCookie', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1508,14 +1604,16 @@ public function canSeeCookie($name, $params = null) { * * @param $cookie * @param array $params + * * @return mixed + * * @see \Codeception\Lib\InnerBrowser::seeCookie() */ - public function seeCookie($name, $params = null) { + public function seeCookie($name, $params = null) + { return $this->scenario->runStep(new \Codeception\Step\Assertion('seeCookie', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1523,15 +1621,18 @@ public function seeCookie($name, $params = null) { * You can set additional cookie params like `domain`, `path` as array passed in last argument. * * @param $cookie - * * @param array $params + * * @return mixed - * Conditional Assertion: Test won't be stopped on fail + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::dontSeeCookie() */ - public function cantSeeCookie($name, $params = null) { + public function cantSeeCookie($name, $params = null) + { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeCookie', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1539,16 +1640,17 @@ public function cantSeeCookie($name, $params = null) { * You can set additional cookie params like `domain`, `path` as array passed in last argument. * * @param $cookie - * * @param array $params + * * @return mixed + * * @see \Codeception\Lib\InnerBrowser::dontSeeCookie() */ - public function dontSeeCookie($name, $params = null) { + public function dontSeeCookie($name, $params = null) + { return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeCookie', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1556,16 +1658,17 @@ public function dontSeeCookie($name, $params = null) { * You can set additional cookie params like `domain`, `path` in array passed as last argument. * * @param $cookie - * * @param array $params + * * @return mixed + * * @see \Codeception\Lib\InnerBrowser::resetCookie() */ - public function resetCookie($name, $params = null) { + public function resetCookie($name, $params = null) + { return $this->scenario->runStep(new \Codeception\Step\Action('resetCookie', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1586,13 +1689,17 @@ public function resetCookie($name, $params = null) { * * @param $selector * @param array $attributes + * * @return * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::seeElement() */ - public function canSeeElement($selector, $attributes = null) { + public function canSeeElement($selector, $attributes = null) + { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeElement', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1613,14 +1720,16 @@ public function canSeeElement($selector, $attributes = null) { * * @param $selector * @param array $attributes + * * @return + * * @see \Codeception\Lib\InnerBrowser::seeElement() */ - public function seeElement($selector, $attributes = null) { + public function seeElement($selector, $attributes = null) + { return $this->scenario->runStep(new \Codeception\Step\Assertion('seeElement', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1638,12 +1747,15 @@ public function seeElement($selector, $attributes = null) { * * @param $selector * @param array $attributes - * Conditional Assertion: Test won't be stopped on fail + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::dontSeeElement() */ - public function cantSeeElement($selector, $attributes = null) { + public function cantSeeElement($selector, $attributes = null) + { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeElement', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1661,56 +1773,63 @@ public function cantSeeElement($selector, $attributes = null) { * * @param $selector * @param array $attributes + * * @see \Codeception\Lib\InnerBrowser::dontSeeElement() */ - public function dontSeeElement($selector, $attributes = null) { + public function dontSeeElement($selector, $attributes = null) + { return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeElement', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * * Checks that there are a certain number of elements matched by the given locator on the page. - * + * * ``` php * seeNumberOfElements('tr', 10); * $I->seeNumberOfElements('tr', [0,10]); //between 0 and 10 elements * ?> * ``` + * * @param $selector * @param mixed $expected: - * - string: strict number - * - array: range of numbers [0,10] - * Conditional Assertion: Test won't be stopped on fail + * - string: strict number + * - array: range of numbers [0,10] + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::seeNumberOfElements() */ - public function canSeeNumberOfElements($selector, $expected) { + public function canSeeNumberOfElements($selector, $expected) + { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeNumberOfElements', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * * Checks that there are a certain number of elements matched by the given locator on the page. - * + * * ``` php * seeNumberOfElements('tr', 10); * $I->seeNumberOfElements('tr', [0,10]); //between 0 and 10 elements * ?> * ``` + * * @param $selector * @param mixed $expected: - * - string: strict number - * - array: range of numbers [0,10] + * - string: strict number + * - array: range of numbers [0,10] + * * @see \Codeception\Lib\InnerBrowser::seeNumberOfElements() */ - public function seeNumberOfElements($selector, $expected) { + public function seeNumberOfElements($selector, $expected) + { return $this->scenario->runStep(new \Codeception\Step\Assertion('seeNumberOfElements', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1726,12 +1845,15 @@ public function seeNumberOfElements($selector, $expected) { * @param $optionText * * @return mixed - * Conditional Assertion: Test won't be stopped on fail + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::seeOptionIsSelected() */ - public function canSeeOptionIsSelected($select, $optionText) { + public function canSeeOptionIsSelected($select, $optionText) + { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeOptionIsSelected', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1747,13 +1869,14 @@ public function canSeeOptionIsSelected($select, $optionText) { * @param $optionText * * @return mixed + * * @see \Codeception\Lib\InnerBrowser::seeOptionIsSelected() */ - public function seeOptionIsSelected($select, $optionText) { + public function seeOptionIsSelected($select, $optionText) + { return $this->scenario->runStep(new \Codeception\Step\Assertion('seeOptionIsSelected', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1769,12 +1892,15 @@ public function seeOptionIsSelected($select, $optionText) { * @param $optionText * * @return mixed - * Conditional Assertion: Test won't be stopped on fail + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::dontSeeOptionIsSelected() */ - public function cantSeeOptionIsSelected($select, $optionText) { + public function cantSeeOptionIsSelected($select, $optionText) + { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeOptionIsSelected', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1790,34 +1916,39 @@ public function cantSeeOptionIsSelected($select, $optionText) { * @param $optionText * * @return mixed + * * @see \Codeception\Lib\InnerBrowser::dontSeeOptionIsSelected() */ - public function dontSeeOptionIsSelected($select, $optionText) { + public function dontSeeOptionIsSelected($select, $optionText) + { return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeOptionIsSelected', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * * Asserts that current page has 404 response status code. * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::seePageNotFound() */ - public function canSeePageNotFound() { + public function canSeePageNotFound() + { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seePageNotFound', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * * Asserts that current page has 404 response status code. + * * @see \Codeception\Lib\InnerBrowser::seePageNotFound() */ - public function seePageNotFound() { + public function seePageNotFound() + { return $this->scenario->runStep(new \Codeception\Step\Assertion('seePageNotFound', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1826,12 +1957,15 @@ public function seePageNotFound() { * @param $code * * @return mixed - * Conditional Assertion: Test won't be stopped on fail + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::seeResponseCodeIs() */ - public function canSeeResponseCodeIs($code) { + public function canSeeResponseCodeIs($code) + { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeResponseCodeIs', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1840,13 +1974,14 @@ public function canSeeResponseCodeIs($code) { * @param $code * * @return mixed + * * @see \Codeception\Lib\InnerBrowser::seeResponseCodeIs() */ - public function seeResponseCodeIs($code) { + public function seeResponseCodeIs($code) + { return $this->scenario->runStep(new \Codeception\Step\Assertion('seeResponseCodeIs', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1861,12 +1996,15 @@ public function seeResponseCodeIs($code) { * @param $title * * @return mixed - * Conditional Assertion: Test won't be stopped on fail + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::seeInTitle() */ - public function canSeeInTitle($title) { + public function canSeeInTitle($title) + { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeInTitle', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1881,13 +2019,14 @@ public function canSeeInTitle($title) { * @param $title * * @return mixed + * * @see \Codeception\Lib\InnerBrowser::seeInTitle() */ - public function seeInTitle($title) { + public function seeInTitle($title) + { return $this->scenario->runStep(new \Codeception\Step\Assertion('seeInTitle', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1896,12 +2035,15 @@ public function seeInTitle($title) { * @param $title * * @return mixed - * Conditional Assertion: Test won't be stopped on fail + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::dontSeeInTitle() */ - public function cantSeeInTitle($title) { + public function cantSeeInTitle($title) + { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInTitle', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1910,9 +2052,11 @@ public function cantSeeInTitle($title) { * @param $title * * @return mixed + * * @see \Codeception\Lib\InnerBrowser::dontSeeInTitle() */ - public function dontSeeInTitle($title) { + public function dontSeeInTitle($title) + { return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeInTitle', func_get_args())); } } diff --git a/tests/acceptance/_bootstrap.php b/tests/acceptance/_bootstrap.php index 8a88555..62817a5 100644 --- a/tests/acceptance/_bootstrap.php +++ b/tests/acceptance/_bootstrap.php @@ -1,2 +1,3 @@ wantTo('append the newly created workflow if another one exists'); @@ -14,4 +15,4 @@ $I->seeInWorkflows('Append/workflows.stub'); $I->clearWorkflow('UpdateUser'); -$I->clearWorkflow('DeleteUser'); \ No newline at end of file +$I->clearWorkflow('DeleteUser'); diff --git a/tests/functional/CreateUnguardedWorkflowCept.php b/tests/functional/CreateUnguardedWorkflowCept.php index 0485dee..4333ea6 100644 --- a/tests/functional/CreateUnguardedWorkflowCept.php +++ b/tests/functional/CreateUnguardedWorkflowCept.php @@ -1,4 +1,5 @@ -wantTo('create an unguarded workflow'); @@ -11,4 +12,4 @@ $I->seeInWorkflows('Unguarded/workflows.stub'); $I->seeInShellOutput('Workflow created successfully.'); -$I->clearWorkflow('IndexPosts'); \ No newline at end of file +$I->clearWorkflow('IndexPosts'); diff --git a/tests/functional/CreateWorkflowWithManyPipesCept.php b/tests/functional/CreateWorkflowWithManyPipesCept.php index 7d278ed..08e94f0 100644 --- a/tests/functional/CreateWorkflowWithManyPipesCept.php +++ b/tests/functional/CreateWorkflowWithManyPipesCept.php @@ -1,4 +1,5 @@ -wantTo('create a workflow with many pipes'); @@ -14,4 +15,4 @@ $I->seeInShellOutput('Pipe created successfully.'); $I->seeInShellOutput('Workflow created successfully.'); -$I->clearWorkflow('RegisterUser'); \ No newline at end of file +$I->clearWorkflow('RegisterUser'); diff --git a/tests/functional/CreateWorkflowWithNoPipesCept.php b/tests/functional/CreateWorkflowWithNoPipesCept.php index 8b6a4ca..cb220c9 100644 --- a/tests/functional/CreateWorkflowWithNoPipesCept.php +++ b/tests/functional/CreateWorkflowWithNoPipesCept.php @@ -1,4 +1,5 @@ -wantTo('create a workflow with no pipes'); @@ -12,4 +13,4 @@ $I->dontSeeInShellOutput('Pipe created successfully.'); $I->seeInShellOutput('Workflow created successfully.'); -$I->clearWorkflow('LoginUser'); \ No newline at end of file +$I->clearWorkflow('LoginUser'); diff --git a/tests/functional/DeleteDetachedPipesDuringUpdateIfForcedCept.php b/tests/functional/DeleteDetachedPipesDuringUpdateIfForcedCept.php index 36993cb..e9044cf 100644 --- a/tests/functional/DeleteDetachedPipesDuringUpdateIfForcedCept.php +++ b/tests/functional/DeleteDetachedPipesDuringUpdateIfForcedCept.php @@ -1,4 +1,5 @@ -wantTo('delete the detached pipes during an update'); @@ -11,4 +12,4 @@ $I->seeInWorkflows('DeleteDetached/workflows.stub'); $I->seeInShellOutput('Workflow updated successfully.'); -$I->clearWorkflow('RegisterUser'); \ No newline at end of file +$I->clearWorkflow('RegisterUser'); diff --git a/tests/functional/DeleteWorkflowAndItsFilesCept.php b/tests/functional/DeleteWorkflowAndItsFilesCept.php index 38cc9b2..5c91599 100644 --- a/tests/functional/DeleteWorkflowAndItsFilesCept.php +++ b/tests/functional/DeleteWorkflowAndItsFilesCept.php @@ -1,4 +1,5 @@ -wantTo('delete a workflow and its files'); @@ -15,4 +16,4 @@ $I->seeInWorkflows('Delete/workflows.stub'); $I->seeInShellOutput('Workflow deleted successfully.'); -$I->clearWorkflow('PublishPost'); \ No newline at end of file +$I->clearWorkflow('PublishPost'); diff --git a/tests/functional/DeleteWorkflowButSpareFilesCept.php b/tests/functional/DeleteWorkflowButSpareFilesCept.php index c621500..8df7861 100644 --- a/tests/functional/DeleteWorkflowButSpareFilesCept.php +++ b/tests/functional/DeleteWorkflowButSpareFilesCept.php @@ -1,4 +1,5 @@ -wantTo('delete a workflow keeping its files'); @@ -15,4 +16,4 @@ $I->seeInWorkflows('Delete/workflows.stub'); $I->seeInShellOutput('Workflow deleted successfully.'); -$I->clearWorkflow('BanUser'); \ No newline at end of file +$I->clearWorkflow('BanUser'); diff --git a/tests/functional/DisplayErrorIfWorkflowAlreadyExistsCept.php b/tests/functional/DisplayErrorIfWorkflowAlreadyExistsCept.php index f0faee7..1a4f938 100644 --- a/tests/functional/DisplayErrorIfWorkflowAlreadyExistsCept.php +++ b/tests/functional/DisplayErrorIfWorkflowAlreadyExistsCept.php @@ -1,4 +1,5 @@ -wantTo('see an error if the workflow to create already exists'); @@ -8,4 +9,4 @@ $I->runArtisan('workflow:create registerUser'); $I->seeInShellOutput('The workflow [RegisterUser] already exists.'); -$I->clearWorkflow('RegisterUser'); \ No newline at end of file +$I->clearWorkflow('RegisterUser'); diff --git a/tests/functional/DisplayErrorIfWorkflowNotExistsDuringReadCept.php b/tests/functional/DisplayErrorIfWorkflowNotExistsDuringReadCept.php index 365a4ce..1127ad9 100644 --- a/tests/functional/DisplayErrorIfWorkflowNotExistsDuringReadCept.php +++ b/tests/functional/DisplayErrorIfWorkflowNotExistsDuringReadCept.php @@ -1,7 +1,8 @@ -wantTo('see an error if the workflow to read does not exist'); $I->runArtisan('workflow:read unknown'); -$I->seeInShellOutput('The workflow [Unknown] does not exist.'); \ No newline at end of file +$I->seeInShellOutput('The workflow [Unknown] does not exist.'); diff --git a/tests/functional/DisplayErrorIfWorkflowNotExistsDuringUpdateCept.php b/tests/functional/DisplayErrorIfWorkflowNotExistsDuringUpdateCept.php index 32cc3a0..864275d 100644 --- a/tests/functional/DisplayErrorIfWorkflowNotExistsDuringUpdateCept.php +++ b/tests/functional/DisplayErrorIfWorkflowNotExistsDuringUpdateCept.php @@ -1,7 +1,8 @@ -wantTo('see an error if a workflow does not exist during an update'); $I->runArtisan('workflow:update unknown'); -$I->seeInShellOutput('The workflow [Unknown] does not exist.'); \ No newline at end of file +$I->seeInShellOutput('The workflow [Unknown] does not exist.'); diff --git a/tests/functional/FunctionalTester.php b/tests/functional/FunctionalTester.php index f7e5df0..b2e9d99 100644 --- a/tests/functional/FunctionalTester.php +++ b/tests/functional/FunctionalTester.php @@ -1,4 +1,6 @@ -scenario->runStep(new \Codeception\Step\Condition('amInPath', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -57,13 +57,14 @@ public function amInPath($path) { * ``` * * @param $filename + * * @see \Codeception\Module\Filesystem::openFile() */ - public function openFile($filename) { + public function openFile($filename) + { return $this->scenario->runStep(new \Codeception\Step\Action('openFile', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -76,13 +77,14 @@ public function openFile($filename) { * ``` * * @param $filename + * * @see \Codeception\Module\Filesystem::deleteFile() */ - public function deleteFile($filename) { + public function deleteFile($filename) + { return $this->scenario->runStep(new \Codeception\Step\Action('deleteFile', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -95,13 +97,14 @@ public function deleteFile($filename) { * ``` * * @param $dirname + * * @see \Codeception\Module\Filesystem::deleteDir() */ - public function deleteDir($dirname) { + public function deleteDir($dirname) + { return $this->scenario->runStep(new \Codeception\Step\Action('deleteDir', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -115,13 +118,14 @@ public function deleteDir($dirname) { * * @param $src * @param $dst + * * @see \Codeception\Module\Filesystem::copyDir() */ - public function copyDir($src, $dst) { + public function copyDir($src, $dst) + { return $this->scenario->runStep(new \Codeception\Step\Action('copyDir', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -138,11 +142,14 @@ public function copyDir($src, $dst) { * * @param $text * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Module\Filesystem::seeInThisFile() */ - public function canSeeInThisFile($text) { + public function canSeeInThisFile($text) + { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeInThisFile', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -158,13 +165,14 @@ public function canSeeInThisFile($text) { * ``` * * @param $text + * * @see \Codeception\Module\Filesystem::seeInThisFile() */ - public function seeInThisFile($text) { + public function seeInThisFile($text) + { return $this->scenario->runStep(new \Codeception\Step\Assertion('seeInThisFile', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -182,11 +190,14 @@ public function seeInThisFile($text) { * * @param $text * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Module\Filesystem::seeFileContentsEqual() */ - public function canSeeFileContentsEqual($text) { + public function canSeeFileContentsEqual($text) + { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeFileContentsEqual', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -203,13 +214,14 @@ public function canSeeFileContentsEqual($text) { * ``` * * @param $text + * * @see \Codeception\Module\Filesystem::seeFileContentsEqual() */ - public function seeFileContentsEqual($text) { + public function seeFileContentsEqual($text) + { return $this->scenario->runStep(new \Codeception\Step\Assertion('seeFileContentsEqual', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -224,11 +236,14 @@ public function seeFileContentsEqual($text) { * * @param $text * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Module\Filesystem::dontSeeInThisFile() */ - public function cantSeeInThisFile($text) { + public function cantSeeInThisFile($text) + { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInThisFile', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -242,24 +257,26 @@ public function cantSeeInThisFile($text) { * ``` * * @param $text + * * @see \Codeception\Module\Filesystem::dontSeeInThisFile() */ - public function dontSeeInThisFile($text) { + public function dontSeeInThisFile($text) + { return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeInThisFile', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * * Deletes a file + * * @see \Codeception\Module\Filesystem::deleteThisFile() */ - public function deleteThisFile() { + public function deleteThisFile() + { return $this->scenario->runStep(new \Codeception\Step\Action('deleteThisFile', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -274,12 +291,15 @@ public function deleteThisFile() { * * @param $filename * @param string $path - * Conditional Assertion: Test won't be stopped on fail + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Module\Filesystem::seeFileFound() */ - public function canSeeFileFound($filename, $path = null) { + public function canSeeFileFound($filename, $path = null) + { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeFileFound', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -294,13 +314,14 @@ public function canSeeFileFound($filename, $path = null) { * * @param $filename * @param string $path + * * @see \Codeception\Module\Filesystem::seeFileFound() */ - public function seeFileFound($filename, $path = null) { + public function seeFileFound($filename, $path = null) + { return $this->scenario->runStep(new \Codeception\Step\Assertion('seeFileFound', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -308,12 +329,15 @@ public function seeFileFound($filename, $path = null) { * * @param $filename * @param string $path - * Conditional Assertion: Test won't be stopped on fail + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Module\Filesystem::dontSeeFileFound() */ - public function cantSeeFileFound($filename, $path = null) { + public function cantSeeFileFound($filename, $path = null) + { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeFileFound', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -321,13 +345,14 @@ public function cantSeeFileFound($filename, $path = null) { * * @param $filename * @param string $path + * * @see \Codeception\Module\Filesystem::dontSeeFileFound() */ - public function dontSeeFileFound($filename, $path = null) { + public function dontSeeFileFound($filename, $path = null) + { return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeFileFound', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -340,13 +365,14 @@ public function dontSeeFileFound($filename, $path = null) { * ``` * * @param $dirname + * * @see \Codeception\Module\Filesystem::cleanDir() */ - public function cleanDir($dirname) { + public function cleanDir($dirname) + { return $this->scenario->runStep(new \Codeception\Step\Action('cleanDir', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -354,414 +380,517 @@ public function cleanDir($dirname) { * * @param $filename * @param $contents + * * @see \Codeception\Module\Filesystem::writeToFile() */ - public function writeToFile($filename, $contents) { + public function writeToFile($filename, $contents) + { return $this->scenario->runStep(new \Codeception\Step\Action('writeToFile', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * * Run an Artisan job. - * - * @author Andrea Marco Sartori - * @param string $job - * @return void + * + * @author Andrea Marco Sartori + * + * @param string $job + * + * @return void + * * @see \Codeception\Module\FunctionalHelper::runArtisan() */ - public function runArtisan($job) { + public function runArtisan($job) + { return $this->scenario->runStep(new \Codeception\Step\Action('runArtisan', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * * Check if the content of a generated job is equal to the given stub. - * - * @author Andrea Marco Sartori - * @param string $job - * @param string $stub - * @return void - * Conditional Assertion: Test won't be stopped on fail + * + * @author Andrea Marco Sartori + * + * @param string $job + * @param string $stub + * + * @return void + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Module\FunctionalHelper::seeInJob() */ - public function canSeeInJob($job, $stub) { + public function canSeeInJob($job, $stub) + { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeInJob', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * * Check if the content of a generated job is equal to the given stub. - * - * @author Andrea Marco Sartori - * @param string $job - * @param string $stub - * @return void + * + * @author Andrea Marco Sartori + * + * @param string $job + * @param string $stub + * + * @return void + * * @see \Codeception\Module\FunctionalHelper::seeInJob() */ - public function seeInJob($job, $stub) { + public function seeInJob($job, $stub) + { return $this->scenario->runStep(new \Codeception\Step\Assertion('seeInJob', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * * Check if the content of a generated request is equal to the given stub. - * - * @author Andrea Marco Sartori - * @param string $request - * @param string $stub - * @return void - * Conditional Assertion: Test won't be stopped on fail + * + * @author Andrea Marco Sartori + * + * @param string $request + * @param string $stub + * + * @return void + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Module\FunctionalHelper::seeInRequest() */ - public function canSeeInRequest($request, $stub) { + public function canSeeInRequest($request, $stub) + { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeInRequest', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * * Check if the content of a generated request is equal to the given stub. - * - * @author Andrea Marco Sartori - * @param string $request - * @param string $stub - * @return void + * + * @author Andrea Marco Sartori + * + * @param string $request + * @param string $stub + * + * @return void + * * @see \Codeception\Module\FunctionalHelper::seeInRequest() */ - public function seeInRequest($request, $stub) { + public function seeInRequest($request, $stub) + { return $this->scenario->runStep(new \Codeception\Step\Assertion('seeInRequest', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * * Check if the content of a generated pipe is equal to the given stub. - * - * @author Andrea Marco Sartori - * @param string $pipe - * @param string $stub - * @param string $path - * @return void - * Conditional Assertion: Test won't be stopped on fail + * + * @author Andrea Marco Sartori + * + * @param string $pipe + * @param string $stub + * @param string $path + * + * @return void + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Module\FunctionalHelper::seeInPipe() */ - public function canSeeInPipe($pipe, $stub, $path = null) { + public function canSeeInPipe($pipe, $stub, $path = null) + { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeInPipe', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * * Check if the content of a generated pipe is equal to the given stub. - * - * @author Andrea Marco Sartori - * @param string $pipe - * @param string $stub - * @param string $path - * @return void + * + * @author Andrea Marco Sartori + * + * @param string $pipe + * @param string $stub + * @param string $path + * + * @return void + * * @see \Codeception\Module\FunctionalHelper::seeInPipe() */ - public function seeInPipe($pipe, $stub, $path = null) { + public function seeInPipe($pipe, $stub, $path = null) + { return $this->scenario->runStep(new \Codeception\Step\Assertion('seeInPipe', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * * Check if the content of the generated workflows list is equal to the given stub. - * - * @author Andrea Marco Sartori - * @param string $stub - * @param string $path - * @return void - * Conditional Assertion: Test won't be stopped on fail + * + * @author Andrea Marco Sartori + * + * @param string $stub + * @param string $path + * + * @return void + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Module\FunctionalHelper::seeInWorkflows() */ - public function canSeeInWorkflows($stub, $path = null) { + public function canSeeInWorkflows($stub, $path = null) + { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeInWorkflows', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * * Check if the content of the generated workflows list is equal to the given stub. - * - * @author Andrea Marco Sartori - * @param string $stub - * @param string $path - * @return void + * + * @author Andrea Marco Sartori + * + * @param string $stub + * @param string $path + * + * @return void + * * @see \Codeception\Module\FunctionalHelper::seeInWorkflows() */ - public function seeInWorkflows($stub, $path = null) { + public function seeInWorkflows($stub, $path = null) + { return $this->scenario->runStep(new \Codeception\Step\Assertion('seeInWorkflows', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * * Check if the content of a file is equal to the given stub. - * - * @author Andrea Marco Sartori - * @param string $file - * @param string $stub - * @return void - * Conditional Assertion: Test won't be stopped on fail + * + * @author Andrea Marco Sartori + * + * @param string $file + * @param string $stub + * + * @return void + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Module\FunctionalHelper::seeStubInFile() */ - public function canSeeStubInFile($file, $stub) { + public function canSeeStubInFile($file, $stub) + { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeStubInFile', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * * Check if the content of a file is equal to the given stub. - * - * @author Andrea Marco Sartori - * @param string $file - * @param string $stub - * @return void + * + * @author Andrea Marco Sartori + * + * @param string $file + * @param string $stub + * + * @return void + * * @see \Codeception\Module\FunctionalHelper::seeStubInFile() */ - public function seeStubInFile($file, $stub) { + public function seeStubInFile($file, $stub) + { return $this->scenario->runStep(new \Codeception\Step\Assertion('seeStubInFile', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * * Remove all the generated files for a given workflow. - * - * @author Andrea Marco Sartori - * @param string $workflow - * @param string $path - * @return void + * + * @author Andrea Marco Sartori + * + * @param string $workflow + * @param string $path + * + * @return void + * * @see \Codeception\Module\FunctionalHelper::clearWorkflow() */ - public function clearWorkflow($workflow, $path = null) { + public function clearWorkflow($workflow, $path = null) + { return $this->scenario->runStep(new \Codeception\Step\Action('clearWorkflow', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * * Assert a given request does not exist. - * - * @author Andrea Marco Sartori - * @param string $request - * @return void - * Conditional Assertion: Test won't be stopped on fail + * + * @author Andrea Marco Sartori + * + * @param string $request + * + * @return void + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Module\FunctionalHelper::dontSeeRequest() */ - public function cantSeeRequest($request) { + public function cantSeeRequest($request) + { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeRequest', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * * Assert a given request does not exist. - * - * @author Andrea Marco Sartori - * @param string $request - * @return void + * + * @author Andrea Marco Sartori + * + * @param string $request + * + * @return void + * * @see \Codeception\Module\FunctionalHelper::dontSeeRequest() */ - public function dontSeeRequest($request) { + public function dontSeeRequest($request) + { return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeRequest', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * * Assert a given pipe does exist. - * - * @author Andrea Marco Sartori - * @param string $pipe - * @param string $path - * @return void - * Conditional Assertion: Test won't be stopped on fail + * + * @author Andrea Marco Sartori + * + * @param string $pipe + * @param string $path + * + * @return void + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Module\FunctionalHelper::seePipe() */ - public function canSeePipe($pipe, $path = null) { + public function canSeePipe($pipe, $path = null) + { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seePipe', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * * Assert a given pipe does exist. - * - * @author Andrea Marco Sartori - * @param string $pipe - * @param string $path - * @return void + * + * @author Andrea Marco Sartori + * + * @param string $pipe + * @param string $path + * + * @return void + * * @see \Codeception\Module\FunctionalHelper::seePipe() */ - public function seePipe($pipe, $path = null) { + public function seePipe($pipe, $path = null) + { return $this->scenario->runStep(new \Codeception\Step\Assertion('seePipe', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * * Assert a given pipe does not exist. - * - * @author Andrea Marco Sartori - * @param string $pipe - * @param string $path - * @return void - * Conditional Assertion: Test won't be stopped on fail + * + * @author Andrea Marco Sartori + * + * @param string $pipe + * @param string $path + * + * @return void + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Module\FunctionalHelper::dontSeePipe() */ - public function cantSeePipe($pipe, $path = null) { + public function cantSeePipe($pipe, $path = null) + { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeePipe', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * * Assert a given pipe does not exist. - * - * @author Andrea Marco Sartori - * @param string $pipe - * @param string $path - * @return void + * + * @author Andrea Marco Sartori + * + * @param string $pipe + * @param string $path + * + * @return void + * * @see \Codeception\Module\FunctionalHelper::dontSeePipe() */ - public function dontSeePipe($pipe, $path = null) { + public function dontSeePipe($pipe, $path = null) + { return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeePipe', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * * Assert a given job does exist. - * - * @author Andrea Marco Sartori - * @param string $job - * @param string $path - * @return void - * Conditional Assertion: Test won't be stopped on fail + * + * @author Andrea Marco Sartori + * + * @param string $job + * @param string $path + * + * @return void + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Module\FunctionalHelper::seeJob() */ - public function canSeeJob($job, $path = null) { + public function canSeeJob($job, $path = null) + { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeJob', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * * Assert a given job does exist. - * - * @author Andrea Marco Sartori - * @param string $job - * @param string $path - * @return void + * + * @author Andrea Marco Sartori + * + * @param string $job + * @param string $path + * + * @return void + * * @see \Codeception\Module\FunctionalHelper::seeJob() */ - public function seeJob($job, $path = null) { + public function seeJob($job, $path = null) + { return $this->scenario->runStep(new \Codeception\Step\Assertion('seeJob', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * * Assert a given job does not exist. - * - * @author Andrea Marco Sartori - * @param string $job - * @param string $path - * @return void - * Conditional Assertion: Test won't be stopped on fail + * + * @author Andrea Marco Sartori + * + * @param string $job + * @param string $path + * + * @return void + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Module\FunctionalHelper::dontSeeJob() */ - public function cantSeeJob($job, $path = null) { + public function cantSeeJob($job, $path = null) + { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeJob', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * * Assert a given job does not exist. - * - * @author Andrea Marco Sartori - * @param string $job - * @param string $path - * @return void + * + * @author Andrea Marco Sartori + * + * @param string $job + * @param string $path + * + * @return void + * * @see \Codeception\Module\FunctionalHelper::dontSeeJob() */ - public function dontSeeJob($job, $path = null) { + public function dontSeeJob($job, $path = null) + { return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeJob', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * * Assert a given request does exist. - * - * @author Andrea Marco Sartori - * @param string $request - * @param string $path - * @return void - * Conditional Assertion: Test won't be stopped on fail + * + * @author Andrea Marco Sartori + * + * @param string $request + * @param string $path + * + * @return void + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Module\FunctionalHelper::seeRequest() */ - public function canSeeRequest($request, $path = null) { + public function canSeeRequest($request, $path = null) + { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeRequest', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * * Assert a given request does exist. - * - * @author Andrea Marco Sartori - * @param string $request - * @param string $path - * @return void + * + * @author Andrea Marco Sartori + * + * @param string $request + * @param string $path + * + * @return void + * * @see \Codeception\Module\FunctionalHelper::seeRequest() */ - public function seeRequest($request, $path = null) { + public function seeRequest($request, $path = null) + { return $this->scenario->runStep(new \Codeception\Step\Assertion('seeRequest', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * * Check if a drawing is identical to a given stub. - * - * @author Andrea Marco Sartori - * @param string $stub - * @return void - * Conditional Assertion: Test won't be stopped on fail + * + * @author Andrea Marco Sartori + * + * @param string $stub + * + * @return void + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Module\FunctionalHelper::seeDrawingIs() */ - public function canSeeDrawingIs($stub) { + public function canSeeDrawingIs($stub) + { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeDrawingIs', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * * Check if a drawing is identical to a given stub. - * - * @author Andrea Marco Sartori - * @param string $stub - * @return void + * + * @author Andrea Marco Sartori + * + * @param string $stub + * + * @return void + * * @see \Codeception\Module\FunctionalHelper::seeDrawingIs() */ - public function seeDrawingIs($stub) { + public function seeDrawingIs($stub) + { return $this->scenario->runStep(new \Codeception\Step\Assertion('seeDrawingIs', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -778,13 +907,14 @@ public function seeDrawingIs($stub) { * * @param $job * @param bool $failNonZero + * * @see \Codeception\Module\Cli::runShellJob() */ - public function runShellJob($job, $failNonZero = null) { + public function runShellJob($job, $failNonZero = null) + { return $this->scenario->runStep(new \Codeception\Step\Action('runShellJob', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -792,24 +922,28 @@ public function runShellJob($job, $failNonZero = null) { * * @param $text * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Module\Cli::seeInShellOutput() */ - public function canSeeInShellOutput($text) { + public function canSeeInShellOutput($text) + { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeInShellOutput', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * * Checks that output from last executed job contains text * * @param $text + * * @see \Codeception\Module\Cli::seeInShellOutput() */ - public function seeInShellOutput($text) { + public function seeInShellOutput($text) + { return $this->scenario->runStep(new \Codeception\Step\Assertion('seeInShellOutput', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -818,11 +952,14 @@ public function seeInShellOutput($text) { * @param $text * * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Module\Cli::dontSeeInShellOutput() */ - public function cantSeeInShellOutput($text) { + public function cantSeeInShellOutput($text) + { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInShellOutput', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -832,45 +969,49 @@ public function cantSeeInShellOutput($text) { * * @see \Codeception\Module\Cli::dontSeeInShellOutput() */ - public function dontSeeInShellOutput($text) { + public function dontSeeInShellOutput($text) + { return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeInShellOutput', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * * * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Module\Cli::seeShellOutputMatches() */ - public function canSeeShellOutputMatches($regex) { + public function canSeeShellOutputMatches($regex) + { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeShellOutputMatches', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * * * @see \Codeception\Module\Cli::seeShellOutputMatches() */ - public function seeShellOutputMatches($regex) { + public function seeShellOutputMatches($regex) + { return $this->scenario->runStep(new \Codeception\Step\Assertion('seeShellOutputMatches', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * * Provides access the Laravel application object. * * @return \Illuminate\Foundation\Application + * * @see \Codeception\Module\Laravel5::getApplication() */ - public function getApplication() { + public function getApplication() + { return $this->scenario->runStep(new \Codeception\Step\Action('getApplication', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -884,13 +1025,14 @@ public function getApplication() { * * @param $route * @param array $params + * * @see \Codeception\Module\Laravel5::amOnRoute() */ - public function amOnRoute($route, $params = null) { + public function amOnRoute($route, $params = null) + { return $this->scenario->runStep(new \Codeception\Step\Condition('amOnRoute', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -904,13 +1046,14 @@ public function amOnRoute($route, $params = null) { * * @param $action * @param array $params + * * @see \Codeception\Module\Laravel5::amOnAction() */ - public function amOnAction($action, $params = null) { + public function amOnAction($action, $params = null) + { return $this->scenario->runStep(new \Codeception\Step\Condition('amOnAction', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -921,14 +1064,18 @@ public function amOnAction($action, $params = null) { * $I->seeCurrentRouteIs('posts.index'); * ?> * ``` + * * @param $route * @param array $params - * Conditional Assertion: Test won't be stopped on fail + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Module\Laravel5::seeCurrentRouteIs() */ - public function canSeeCurrentRouteIs($route, $params = null) { + public function canSeeCurrentRouteIs($route, $params = null) + { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeCurrentRouteIs', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -939,15 +1086,17 @@ public function canSeeCurrentRouteIs($route, $params = null) { * $I->seeCurrentRouteIs('posts.index'); * ?> * ``` + * * @param $route * @param array $params + * * @see \Codeception\Module\Laravel5::seeCurrentRouteIs() */ - public function seeCurrentRouteIs($route, $params = null) { + public function seeCurrentRouteIs($route, $params = null) + { return $this->scenario->runStep(new \Codeception\Step\Assertion('seeCurrentRouteIs', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -961,12 +1110,15 @@ public function seeCurrentRouteIs($route, $params = null) { * * @param $action * @param array $params - * Conditional Assertion: Test won't be stopped on fail + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Module\Laravel5::seeCurrentActionIs() */ - public function canSeeCurrentActionIs($action, $params = null) { + public function canSeeCurrentActionIs($action, $params = null) + { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeCurrentActionIs', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -980,94 +1132,111 @@ public function canSeeCurrentActionIs($action, $params = null) { * * @param $action * @param array $params + * * @see \Codeception\Module\Laravel5::seeCurrentActionIs() */ - public function seeCurrentActionIs($action, $params = null) { + public function seeCurrentActionIs($action, $params = null) + { return $this->scenario->runStep(new \Codeception\Step\Assertion('seeCurrentActionIs', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * * Assert that the session has a given list of values. * - * @param string|array $key - * @param mixed $value + * @param string|array $key + * @param mixed $value + * * @return void - * Conditional Assertion: Test won't be stopped on fail + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Module\Laravel5::seeInSession() */ - public function canSeeInSession($key, $value = null) { + public function canSeeInSession($key, $value = null) + { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeInSession', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * * Assert that the session has a given list of values. * - * @param string|array $key - * @param mixed $value + * @param string|array $key + * @param mixed $value + * * @return void + * * @see \Codeception\Module\Laravel5::seeInSession() */ - public function seeInSession($key, $value = null) { + public function seeInSession($key, $value = null) + { return $this->scenario->runStep(new \Codeception\Step\Assertion('seeInSession', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * * Assert that the session has a given list of values. * - * @param array $bindings + * @param array $bindings + * * @return void - * Conditional Assertion: Test won't be stopped on fail + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Module\Laravel5::seeSessionHasValues() */ - public function canSeeSessionHasValues($bindings) { + public function canSeeSessionHasValues($bindings) + { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeSessionHasValues', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * * Assert that the session has a given list of values. * - * @param array $bindings + * @param array $bindings + * * @return void + * * @see \Codeception\Module\Laravel5::seeSessionHasValues() */ - public function seeSessionHasValues($bindings) { + public function seeSessionHasValues($bindings) + { return $this->scenario->runStep(new \Codeception\Step\Assertion('seeSessionHasValues', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * * Assert that the form errors are bound to the View. * * @return bool - * Conditional Assertion: Test won't be stopped on fail + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Module\Laravel5::seeFormHasErrors() */ - public function canSeeFormHasErrors() { + public function canSeeFormHasErrors() + { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeFormHasErrors', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * * Assert that the form errors are bound to the View. * * @return bool + * * @see \Codeception\Module\Laravel5::seeFormHasErrors() */ - public function seeFormHasErrors() { + public function seeFormHasErrors() + { return $this->scenario->runStep(new \Codeception\Step\Assertion('seeFormHasErrors', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1084,13 +1253,17 @@ public function seeFormHasErrors() { * $I->seeFormErrorMessages(array('username'=>'Invalid Username')); * ?> * ``` + * * @param array $bindings - * Conditional Assertion: Test won't be stopped on fail + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Module\Laravel5::seeFormErrorMessages() */ - public function canSeeFormErrorMessages($bindings) { + public function canSeeFormErrorMessages($bindings) + { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeFormErrorMessages', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1107,14 +1280,16 @@ public function canSeeFormErrorMessages($bindings) { * $I->seeFormErrorMessages(array('username'=>'Invalid Username')); * ?> * ``` + * * @param array $bindings + * * @see \Codeception\Module\Laravel5::seeFormErrorMessages() */ - public function seeFormErrorMessages($bindings) { + public function seeFormErrorMessages($bindings) + { return $this->scenario->runStep(new \Codeception\Step\Assertion('seeFormErrorMessages', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1131,14 +1306,18 @@ public function seeFormErrorMessages($bindings) { * $I->seeFormErrorMessage('username', 'Invalid Username'); * ?> * ``` + * * @param string $key * @param string $errorMessage - * Conditional Assertion: Test won't be stopped on fail + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Module\Laravel5::seeFormErrorMessage() */ - public function canSeeFormErrorMessage($key, $errorMessage) { + public function canSeeFormErrorMessage($key, $errorMessage) + { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeFormErrorMessage', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1155,15 +1334,17 @@ public function canSeeFormErrorMessage($key, $errorMessage) { * $I->seeFormErrorMessage('username', 'Invalid Username'); * ?> * ``` + * * @param string $key * @param string $errorMessage + * * @see \Codeception\Module\Laravel5::seeFormErrorMessage() */ - public function seeFormErrorMessage($key, $errorMessage) { + public function seeFormErrorMessage($key, $errorMessage) + { return $this->scenario->runStep(new \Codeception\Step\Assertion('seeFormErrorMessage', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1171,69 +1352,80 @@ public function seeFormErrorMessage($key, $errorMessage) { * Takes either an object that implements the User interface or * an array of credentials. * - * @param \Illuminate\Contracts\Auth\User|array $user - * @param string $driver + * @param \Illuminate\Contracts\Auth\User|array $user + * @param string $driver + * * @return void + * * @see \Codeception\Module\Laravel5::amLoggedAs() */ - public function amLoggedAs($user, $driver = null) { + public function amLoggedAs($user, $driver = null) + { return $this->scenario->runStep(new \Codeception\Step\Condition('amLoggedAs', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * * Logs user out + * * @see \Codeception\Module\Laravel5::logout() */ - public function logout() { + public function logout() + { return $this->scenario->runStep(new \Codeception\Step\Action('logout', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * * Checks that user is authenticated * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Module\Laravel5::seeAuthentication() */ - public function canSeeAuthentication() { + public function canSeeAuthentication() + { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeAuthentication', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * * Checks that user is authenticated + * * @see \Codeception\Module\Laravel5::seeAuthentication() */ - public function seeAuthentication() { + public function seeAuthentication() + { return $this->scenario->runStep(new \Codeception\Step\Assertion('seeAuthentication', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * * Check that user is not authenticated * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Module\Laravel5::dontSeeAuthentication() */ - public function cantSeeAuthentication() { + public function cantSeeAuthentication() + { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeAuthentication', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * * Check that user is not authenticated + * * @see \Codeception\Module\Laravel5::dontSeeAuthentication() */ - public function dontSeeAuthentication() { + public function dontSeeAuthentication() + { return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeAuthentication', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1256,15 +1448,17 @@ public function dontSeeAuthentication() { * ?> * ``` * - * @param string $class + * @param string $class + * * @return mixed + * * @see \Codeception\Module\Laravel5::grabService() */ - public function grabService($class) { + public function grabService($class) + { return $this->scenario->runStep(new \Codeception\Step\Action('grabService', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1278,14 +1472,16 @@ public function grabService($class) { * * @param $model * @param array $attributes + * * @return mixed + * * @see \Codeception\Module\Laravel5::haveRecord() */ - public function haveRecord($model, $attributes = null) { + public function haveRecord($model, $attributes = null) + { return $this->scenario->runStep(new \Codeception\Step\Action('haveRecord', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1297,12 +1493,15 @@ public function haveRecord($model, $attributes = null) { * * @param $model * @param array $attributes - * Conditional Assertion: Test won't be stopped on fail + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Module\Laravel5::seeRecord() */ - public function canSeeRecord($model, $attributes = null) { + public function canSeeRecord($model, $attributes = null) + { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeRecord', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1314,13 +1513,14 @@ public function canSeeRecord($model, $attributes = null) { * * @param $model * @param array $attributes + * * @see \Codeception\Module\Laravel5::seeRecord() */ - public function seeRecord($model, $attributes = null) { + public function seeRecord($model, $attributes = null) + { return $this->scenario->runStep(new \Codeception\Step\Assertion('seeRecord', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1334,12 +1534,15 @@ public function seeRecord($model, $attributes = null) { * * @param $model * @param array $attributes - * Conditional Assertion: Test won't be stopped on fail + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Module\Laravel5::dontSeeRecord() */ - public function cantSeeRecord($model, $attributes = null) { + public function cantSeeRecord($model, $attributes = null) + { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeRecord', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1353,13 +1556,14 @@ public function cantSeeRecord($model, $attributes = null) { * * @param $model * @param array $attributes + * * @see \Codeception\Module\Laravel5::dontSeeRecord() */ - public function dontSeeRecord($model, $attributes = null) { + public function dontSeeRecord($model, $attributes = null) + { return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeRecord', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1373,14 +1577,16 @@ public function dontSeeRecord($model, $attributes = null) { * * @param $model * @param array $attributes + * * @return mixed + * * @see \Codeception\Module\Laravel5::grabRecord() */ - public function grabRecord($model, $attributes = null) { + public function grabRecord($model, $attributes = null) + { return $this->scenario->runStep(new \Codeception\Step\Action('grabRecord', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1388,13 +1594,14 @@ public function grabRecord($model, $attributes = null) { * * @param $username * @param $password + * * @see \Codeception\Lib\InnerBrowser::amHttpAuthenticated() */ - public function amHttpAuthenticated($username, $password) { + public function amHttpAuthenticated($username, $password) + { return $this->scenario->runStep(new \Codeception\Step\Condition('amHttpAuthenticated', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1410,13 +1617,14 @@ public function amHttpAuthenticated($username, $password) { * ``` * * @param $page + * * @see \Codeception\Lib\InnerBrowser::amOnPage() */ - public function amOnPage($page) { + public function amOnPage($page) + { return $this->scenario->runStep(new \Codeception\Step\Condition('amOnPage', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1449,13 +1657,14 @@ public function amOnPage($page) { * * @param $link * @param $context + * * @see \Codeception\Lib\InnerBrowser::click() */ - public function click($link, $context = null) { + public function click($link, $context = null) + { return $this->scenario->runStep(new \Codeception\Step\Action('click', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1472,12 +1681,15 @@ public function click($link, $context = null) { * * @param $text * @param null $selector - * Conditional Assertion: Test won't be stopped on fail + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::see() */ - public function canSee($text, $selector = null) { + public function canSee($text, $selector = null) + { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('see', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1494,13 +1706,14 @@ public function canSee($text, $selector = null) { * * @param $text * @param null $selector + * * @see \Codeception\Lib\InnerBrowser::see() */ - public function see($text, $selector = null) { + public function see($text, $selector = null) + { return $this->scenario->runStep(new \Codeception\Step\Assertion('see', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1517,12 +1730,15 @@ public function see($text, $selector = null) { * * @param $text * @param null $selector - * Conditional Assertion: Test won't be stopped on fail + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::dontSee() */ - public function cantSee($text, $selector = null) { + public function cantSee($text, $selector = null) + { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSee', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1539,13 +1755,14 @@ public function cantSee($text, $selector = null) { * * @param $text * @param null $selector + * * @see \Codeception\Lib\InnerBrowser::dontSee() */ - public function dontSee($text, $selector = null) { + public function dontSee($text, $selector = null) + { return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSee', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1561,12 +1778,15 @@ public function dontSee($text, $selector = null) { * * @param $text * @param null $url - * Conditional Assertion: Test won't be stopped on fail + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::seeLink() */ - public function canSeeLink($text, $url = null) { + public function canSeeLink($text, $url = null) + { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeLink', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1582,13 +1802,14 @@ public function canSeeLink($text, $url = null) { * * @param $text * @param null $url + * * @see \Codeception\Lib\InnerBrowser::seeLink() */ - public function seeLink($text, $url = null) { + public function seeLink($text, $url = null) + { return $this->scenario->runStep(new \Codeception\Step\Assertion('seeLink', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1604,12 +1825,15 @@ public function seeLink($text, $url = null) { * * @param $text * @param null $url - * Conditional Assertion: Test won't be stopped on fail + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::dontSeeLink() */ - public function cantSeeLink($text, $url = null) { + public function cantSeeLink($text, $url = null) + { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeLink', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1625,13 +1849,14 @@ public function cantSeeLink($text, $url = null) { * * @param $text * @param null $url + * * @see \Codeception\Lib\InnerBrowser::dontSeeLink() */ - public function dontSeeLink($text, $url = null) { + public function dontSeeLink($text, $url = null) + { return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeLink', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1648,11 +1873,14 @@ public function dontSeeLink($text, $url = null) { * * @param $uri * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::seeInCurrentUrl() */ - public function canSeeInCurrentUrl($uri) { + public function canSeeInCurrentUrl($uri) + { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeInCurrentUrl', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1668,13 +1896,14 @@ public function canSeeInCurrentUrl($uri) { * ``` * * @param $uri + * * @see \Codeception\Lib\InnerBrowser::seeInCurrentUrl() */ - public function seeInCurrentUrl($uri) { + public function seeInCurrentUrl($uri) + { return $this->scenario->runStep(new \Codeception\Step\Assertion('seeInCurrentUrl', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1688,11 +1917,14 @@ public function seeInCurrentUrl($uri) { * * @param $uri * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::dontSeeInCurrentUrl() */ - public function cantSeeInCurrentUrl($uri) { + public function cantSeeInCurrentUrl($uri) + { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInCurrentUrl', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1705,13 +1937,14 @@ public function cantSeeInCurrentUrl($uri) { * ``` * * @param $uri + * * @see \Codeception\Lib\InnerBrowser::dontSeeInCurrentUrl() */ - public function dontSeeInCurrentUrl($uri) { + public function dontSeeInCurrentUrl($uri) + { return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeInCurrentUrl', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1727,11 +1960,14 @@ public function dontSeeInCurrentUrl($uri) { * * @param $uri * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::seeCurrentUrlEquals() */ - public function canSeeCurrentUrlEquals($uri) { + public function canSeeCurrentUrlEquals($uri) + { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeCurrentUrlEquals', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1746,13 +1982,14 @@ public function canSeeCurrentUrlEquals($uri) { * ``` * * @param $uri + * * @see \Codeception\Lib\InnerBrowser::seeCurrentUrlEquals() */ - public function seeCurrentUrlEquals($uri) { + public function seeCurrentUrlEquals($uri) + { return $this->scenario->runStep(new \Codeception\Step\Assertion('seeCurrentUrlEquals', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1768,11 +2005,14 @@ public function seeCurrentUrlEquals($uri) { * * @param $uri * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::dontSeeCurrentUrlEquals() */ - public function cantSeeCurrentUrlEquals($uri) { + public function cantSeeCurrentUrlEquals($uri) + { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeCurrentUrlEquals', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1787,13 +2027,14 @@ public function cantSeeCurrentUrlEquals($uri) { * ``` * * @param $uri + * * @see \Codeception\Lib\InnerBrowser::dontSeeCurrentUrlEquals() */ - public function dontSeeCurrentUrlEquals($uri) { + public function dontSeeCurrentUrlEquals($uri) + { return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeCurrentUrlEquals', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1808,11 +2049,14 @@ public function dontSeeCurrentUrlEquals($uri) { * * @param $uri * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::seeCurrentUrlMatches() */ - public function canSeeCurrentUrlMatches($uri) { + public function canSeeCurrentUrlMatches($uri) + { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeCurrentUrlMatches', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1826,13 +2070,14 @@ public function canSeeCurrentUrlMatches($uri) { * ``` * * @param $uri + * * @see \Codeception\Lib\InnerBrowser::seeCurrentUrlMatches() */ - public function seeCurrentUrlMatches($uri) { + public function seeCurrentUrlMatches($uri) + { return $this->scenario->runStep(new \Codeception\Step\Assertion('seeCurrentUrlMatches', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1847,11 +2092,14 @@ public function seeCurrentUrlMatches($uri) { * * @param $uri * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::dontSeeCurrentUrlMatches() */ - public function cantSeeCurrentUrlMatches($uri) { + public function cantSeeCurrentUrlMatches($uri) + { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeCurrentUrlMatches', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1865,13 +2113,14 @@ public function cantSeeCurrentUrlMatches($uri) { * ``` * * @param $uri + * * @see \Codeception\Lib\InnerBrowser::dontSeeCurrentUrlMatches() */ - public function dontSeeCurrentUrlMatches($uri) { + public function dontSeeCurrentUrlMatches($uri) + { return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeCurrentUrlMatches', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1888,14 +2137,16 @@ public function dontSeeCurrentUrlMatches($uri) { * @param null $uri * * @internal param $url + * * @return mixed + * * @see \Codeception\Lib\InnerBrowser::grabFromCurrentUrl() */ - public function grabFromCurrentUrl($uri = null) { + public function grabFromCurrentUrl($uri = null) + { return $this->scenario->runStep(new \Codeception\Step\Action('grabFromCurrentUrl', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1911,11 +2162,14 @@ public function grabFromCurrentUrl($uri = null) { * * @param $checkbox * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::seeCheckboxIsChecked() */ - public function canSeeCheckboxIsChecked($checkbox) { + public function canSeeCheckboxIsChecked($checkbox) + { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeCheckboxIsChecked', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1930,13 +2184,14 @@ public function canSeeCheckboxIsChecked($checkbox) { * ``` * * @param $checkbox + * * @see \Codeception\Lib\InnerBrowser::seeCheckboxIsChecked() */ - public function seeCheckboxIsChecked($checkbox) { + public function seeCheckboxIsChecked($checkbox) + { return $this->scenario->runStep(new \Codeception\Step\Assertion('seeCheckboxIsChecked', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1951,11 +2206,14 @@ public function seeCheckboxIsChecked($checkbox) { * * @param $checkbox * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::dontSeeCheckboxIsChecked() */ - public function cantSeeCheckboxIsChecked($checkbox) { + public function cantSeeCheckboxIsChecked($checkbox) + { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeCheckboxIsChecked', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -1969,17 +2227,18 @@ public function cantSeeCheckboxIsChecked($checkbox) { * ``` * * @param $checkbox + * * @see \Codeception\Lib\InnerBrowser::dontSeeCheckboxIsChecked() */ - public function dontSeeCheckboxIsChecked($checkbox) { + public function dontSeeCheckboxIsChecked($checkbox) + { return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeCheckboxIsChecked', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * - * Checks that the given input field or textarea contains the given value. + * Checks that the given input field or textarea contains the given value. * For fuzzy locators, fields are matched by label text, the "name" attribute, CSS, and XPath. * * ``` php @@ -1996,15 +2255,18 @@ public function dontSeeCheckboxIsChecked($checkbox) { * @param $field * @param $value * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::seeInField() */ - public function canSeeInField($field, $value) { + public function canSeeInField($field, $value) + { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeInField', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * - * Checks that the given input field or textarea contains the given value. + * Checks that the given input field or textarea contains the given value. * For fuzzy locators, fields are matched by label text, the "name" attribute, CSS, and XPath. * * ``` php @@ -2020,13 +2282,14 @@ public function canSeeInField($field, $value) { * * @param $field * @param $value + * * @see \Codeception\Lib\InnerBrowser::seeInField() */ - public function seeInField($field, $value) { + public function seeInField($field, $value) + { return $this->scenario->runStep(new \Codeception\Step\Assertion('seeInField', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -2047,11 +2310,14 @@ public function seeInField($field, $value) { * @param $field * @param $value * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::dontSeeInField() */ - public function cantSeeInField($field, $value) { + public function cantSeeInField($field, $value) + { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInField', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -2071,13 +2337,14 @@ public function cantSeeInField($field, $value) { * * @param $field * @param $value + * * @see \Codeception\Lib\InnerBrowser::dontSeeInField() */ - public function dontSeeInField($field, $value) { + public function dontSeeInField($field, $value) + { return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeInField', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -2092,7 +2359,7 @@ public function dontSeeInField($field, $value) { * in the request with the last parameter as an alternative to * explicitly setting its value in the second parameter, as * button values are not otherwise included in the request. - * + * * Examples: * * ``` php @@ -2123,25 +2390,26 @@ public function dontSeeInField($field, $value) { * * ``` * Note that "2" will be the submitted value for the "plan" field, as it is the selected option. - * + * * You can also emulate a JavaScript submission by not specifying any buttons in the third parameter to submitForm. - * + * * ```php * submitForm('#userForm', array('user' => array('login' => 'Davert', 'password' => '123456', 'agree' => true))); - * + * * ``` * * @param $selector * @param $params * @param $button + * * @see \Codeception\Lib\InnerBrowser::submitForm() */ - public function submitForm($selector, $params, $button = null) { + public function submitForm($selector, $params, $button = null) + { return $this->scenario->runStep(new \Codeception\Step\Action('submitForm', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -2156,13 +2424,14 @@ public function submitForm($selector, $params, $button = null) { * * @param $field * @param $value + * * @see \Codeception\Lib\InnerBrowser::fillField() */ - public function fillField($field, $value) { + public function fillField($field, $value) + { return $this->scenario->runStep(new \Codeception\Step\Action('fillField', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -2186,13 +2455,14 @@ public function fillField($field, $value) { * * @param $select * @param $option + * * @see \Codeception\Lib\InnerBrowser::selectOption() */ - public function selectOption($select, $option) { + public function selectOption($select, $option) + { return $this->scenario->runStep(new \Codeception\Step\Action('selectOption', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -2205,13 +2475,14 @@ public function selectOption($select, $option) { * ``` * * @param $option + * * @see \Codeception\Lib\InnerBrowser::checkOption() */ - public function checkOption($option) { + public function checkOption($option) + { return $this->scenario->runStep(new \Codeception\Step\Action('checkOption', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -2224,13 +2495,14 @@ public function checkOption($option) { * ``` * * @param $option + * * @see \Codeception\Lib\InnerBrowser::uncheckOption() */ - public function uncheckOption($option) { + public function uncheckOption($option) + { return $this->scenario->runStep(new \Codeception\Step\Action('uncheckOption', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -2245,13 +2517,14 @@ public function uncheckOption($option) { * * @param $field * @param $filename + * * @see \Codeception\Lib\InnerBrowser::attachFile() */ - public function attachFile($field, $filename) { + public function attachFile($field, $filename) + { return $this->scenario->runStep(new \Codeception\Step\Action('attachFile', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -2262,13 +2535,14 @@ public function attachFile($field, $filename) { * * @param $uri * @param $params + * * @see \Codeception\Lib\InnerBrowser::sendAjaxGetRequest() */ - public function sendAjaxGetRequest($uri, $params = null) { + public function sendAjaxGetRequest($uri, $params = null) + { return $this->scenario->runStep(new \Codeception\Step\Action('sendAjaxGetRequest', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -2290,13 +2564,14 @@ public function sendAjaxGetRequest($uri, $params = null) { * * @param $uri * @param $params + * * @see \Codeception\Lib\InnerBrowser::sendAjaxPostRequest() */ - public function sendAjaxPostRequest($uri, $params = null) { + public function sendAjaxPostRequest($uri, $params = null) + { return $this->scenario->runStep(new \Codeception\Step\Action('sendAjaxPostRequest', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -2316,13 +2591,14 @@ public function sendAjaxPostRequest($uri, $params = null) { * @param $method * @param $uri * @param $params + * * @see \Codeception\Lib\InnerBrowser::sendAjaxRequest() */ - public function sendAjaxRequest($method, $uri, $params = null) { + public function sendAjaxRequest($method, $uri, $params = null) + { return $this->scenario->runStep(new \Codeception\Step\Action('sendAjaxRequest', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -2340,13 +2616,14 @@ public function sendAjaxRequest($method, $uri, $params = null) { * @param $cssOrXPathOrRegex * * @return mixed + * * @see \Codeception\Lib\InnerBrowser::grabTextFrom() */ - public function grabTextFrom($cssOrXPathOrRegex) { + public function grabTextFrom($cssOrXPathOrRegex) + { return $this->scenario->runStep(new \Codeception\Step\Action('grabTextFrom', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -2362,28 +2639,32 @@ public function grabTextFrom($cssOrXPathOrRegex) { * * @param $cssOrXpath * @param $attribute + * * @internal param $element + * * @return mixed + * * @see \Codeception\Lib\InnerBrowser::grabAttributeFrom() */ - public function grabAttributeFrom($cssOrXpath, $attribute) { + public function grabAttributeFrom($cssOrXpath, $attribute) + { return $this->scenario->runStep(new \Codeception\Step\Action('grabAttributeFrom', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * * @param $field * * @return array|mixed|null|string + * * @see \Codeception\Lib\InnerBrowser::grabValueFrom() */ - public function grabValueFrom($field) { + public function grabValueFrom($field) + { return $this->scenario->runStep(new \Codeception\Step\Action('grabValueFrom', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -2399,17 +2680,19 @@ public function grabValueFrom($field) { * @param $name * @param $val * @param array $params + * * @internal param $cookie * @internal param $value * * @return mixed + * * @see \Codeception\Lib\InnerBrowser::setCookie() */ - public function setCookie($name, $val, $params = null) { + public function setCookie($name, $val, $params = null) + { return $this->scenario->runStep(new \Codeception\Step\Action('setCookie', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -2417,16 +2700,17 @@ public function setCookie($name, $val, $params = null) { * You can set additional cookie params like `domain`, `path` in array passed as last argument. * * @param $cookie - * * @param array $params + * * @return mixed + * * @see \Codeception\Lib\InnerBrowser::grabCookie() */ - public function grabCookie($name, $params = null) { + public function grabCookie($name, $params = null) + { return $this->scenario->runStep(new \Codeception\Step\Action('grabCookie', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -2441,13 +2725,17 @@ public function grabCookie($name, $params = null) { * * @param $cookie * @param array $params + * * @return mixed - * Conditional Assertion: Test won't be stopped on fail + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::seeCookie() */ - public function canSeeCookie($name, $params = null) { + public function canSeeCookie($name, $params = null) + { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeCookie', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -2462,14 +2750,16 @@ public function canSeeCookie($name, $params = null) { * * @param $cookie * @param array $params + * * @return mixed + * * @see \Codeception\Lib\InnerBrowser::seeCookie() */ - public function seeCookie($name, $params = null) { + public function seeCookie($name, $params = null) + { return $this->scenario->runStep(new \Codeception\Step\Assertion('seeCookie', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -2477,15 +2767,18 @@ public function seeCookie($name, $params = null) { * You can set additional cookie params like `domain`, `path` as array passed in last argument. * * @param $cookie - * * @param array $params + * * @return mixed - * Conditional Assertion: Test won't be stopped on fail + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::dontSeeCookie() */ - public function cantSeeCookie($name, $params = null) { + public function cantSeeCookie($name, $params = null) + { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeCookie', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -2493,16 +2786,17 @@ public function cantSeeCookie($name, $params = null) { * You can set additional cookie params like `domain`, `path` as array passed in last argument. * * @param $cookie - * * @param array $params + * * @return mixed + * * @see \Codeception\Lib\InnerBrowser::dontSeeCookie() */ - public function dontSeeCookie($name, $params = null) { + public function dontSeeCookie($name, $params = null) + { return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeCookie', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -2510,16 +2804,17 @@ public function dontSeeCookie($name, $params = null) { * You can set additional cookie params like `domain`, `path` in array passed as last argument. * * @param $cookie - * * @param array $params + * * @return mixed + * * @see \Codeception\Lib\InnerBrowser::resetCookie() */ - public function resetCookie($name, $params = null) { + public function resetCookie($name, $params = null) + { return $this->scenario->runStep(new \Codeception\Step\Action('resetCookie', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -2540,13 +2835,17 @@ public function resetCookie($name, $params = null) { * * @param $selector * @param array $attributes + * * @return * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::seeElement() */ - public function canSeeElement($selector, $attributes = null) { + public function canSeeElement($selector, $attributes = null) + { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeElement', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -2567,14 +2866,16 @@ public function canSeeElement($selector, $attributes = null) { * * @param $selector * @param array $attributes + * * @return + * * @see \Codeception\Lib\InnerBrowser::seeElement() */ - public function seeElement($selector, $attributes = null) { + public function seeElement($selector, $attributes = null) + { return $this->scenario->runStep(new \Codeception\Step\Assertion('seeElement', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -2592,12 +2893,15 @@ public function seeElement($selector, $attributes = null) { * * @param $selector * @param array $attributes - * Conditional Assertion: Test won't be stopped on fail + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::dontSeeElement() */ - public function cantSeeElement($selector, $attributes = null) { + public function cantSeeElement($selector, $attributes = null) + { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeElement', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -2615,56 +2919,63 @@ public function cantSeeElement($selector, $attributes = null) { * * @param $selector * @param array $attributes + * * @see \Codeception\Lib\InnerBrowser::dontSeeElement() */ - public function dontSeeElement($selector, $attributes = null) { + public function dontSeeElement($selector, $attributes = null) + { return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeElement', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * * Checks that there are a certain number of elements matched by the given locator on the page. - * + * * ``` php * seeNumberOfElements('tr', 10); * $I->seeNumberOfElements('tr', [0,10]); //between 0 and 10 elements * ?> * ``` + * * @param $selector * @param mixed $expected: - * - string: strict number - * - array: range of numbers [0,10] - * Conditional Assertion: Test won't be stopped on fail + * - string: strict number + * - array: range of numbers [0,10] + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::seeNumberOfElements() */ - public function canSeeNumberOfElements($selector, $expected) { + public function canSeeNumberOfElements($selector, $expected) + { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeNumberOfElements', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * * Checks that there are a certain number of elements matched by the given locator on the page. - * + * * ``` php * seeNumberOfElements('tr', 10); * $I->seeNumberOfElements('tr', [0,10]); //between 0 and 10 elements * ?> * ``` + * * @param $selector * @param mixed $expected: - * - string: strict number - * - array: range of numbers [0,10] + * - string: strict number + * - array: range of numbers [0,10] + * * @see \Codeception\Lib\InnerBrowser::seeNumberOfElements() */ - public function seeNumberOfElements($selector, $expected) { + public function seeNumberOfElements($selector, $expected) + { return $this->scenario->runStep(new \Codeception\Step\Assertion('seeNumberOfElements', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -2680,12 +2991,15 @@ public function seeNumberOfElements($selector, $expected) { * @param $optionText * * @return mixed - * Conditional Assertion: Test won't be stopped on fail + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::seeOptionIsSelected() */ - public function canSeeOptionIsSelected($select, $optionText) { + public function canSeeOptionIsSelected($select, $optionText) + { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeOptionIsSelected', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -2701,13 +3015,14 @@ public function canSeeOptionIsSelected($select, $optionText) { * @param $optionText * * @return mixed + * * @see \Codeception\Lib\InnerBrowser::seeOptionIsSelected() */ - public function seeOptionIsSelected($select, $optionText) { + public function seeOptionIsSelected($select, $optionText) + { return $this->scenario->runStep(new \Codeception\Step\Assertion('seeOptionIsSelected', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -2723,12 +3038,15 @@ public function seeOptionIsSelected($select, $optionText) { * @param $optionText * * @return mixed - * Conditional Assertion: Test won't be stopped on fail + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::dontSeeOptionIsSelected() */ - public function cantSeeOptionIsSelected($select, $optionText) { + public function cantSeeOptionIsSelected($select, $optionText) + { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeOptionIsSelected', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -2744,34 +3062,39 @@ public function cantSeeOptionIsSelected($select, $optionText) { * @param $optionText * * @return mixed + * * @see \Codeception\Lib\InnerBrowser::dontSeeOptionIsSelected() */ - public function dontSeeOptionIsSelected($select, $optionText) { + public function dontSeeOptionIsSelected($select, $optionText) + { return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeOptionIsSelected', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * * Asserts that current page has 404 response status code. * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::seePageNotFound() */ - public function canSeePageNotFound() { + public function canSeePageNotFound() + { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seePageNotFound', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * * Asserts that current page has 404 response status code. + * * @see \Codeception\Lib\InnerBrowser::seePageNotFound() */ - public function seePageNotFound() { + public function seePageNotFound() + { return $this->scenario->runStep(new \Codeception\Step\Assertion('seePageNotFound', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -2780,12 +3103,15 @@ public function seePageNotFound() { * @param $code * * @return mixed - * Conditional Assertion: Test won't be stopped on fail + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::seeResponseCodeIs() */ - public function canSeeResponseCodeIs($code) { + public function canSeeResponseCodeIs($code) + { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeResponseCodeIs', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -2794,13 +3120,14 @@ public function canSeeResponseCodeIs($code) { * @param $code * * @return mixed + * * @see \Codeception\Lib\InnerBrowser::seeResponseCodeIs() */ - public function seeResponseCodeIs($code) { + public function seeResponseCodeIs($code) + { return $this->scenario->runStep(new \Codeception\Step\Assertion('seeResponseCodeIs', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -2815,12 +3142,15 @@ public function seeResponseCodeIs($code) { * @param $title * * @return mixed - * Conditional Assertion: Test won't be stopped on fail + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::seeInTitle() */ - public function canSeeInTitle($title) { + public function canSeeInTitle($title) + { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeInTitle', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -2835,13 +3165,14 @@ public function canSeeInTitle($title) { * @param $title * * @return mixed + * * @see \Codeception\Lib\InnerBrowser::seeInTitle() */ - public function seeInTitle($title) { + public function seeInTitle($title) + { return $this->scenario->runStep(new \Codeception\Step\Assertion('seeInTitle', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -2850,12 +3181,15 @@ public function seeInTitle($title) { * @param $title * * @return mixed - * Conditional Assertion: Test won't be stopped on fail + * Conditional Assertion: Test won't be stopped on fail + * * @see \Codeception\Lib\InnerBrowser::dontSeeInTitle() */ - public function cantSeeInTitle($title) { + public function cantSeeInTitle($title) + { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInTitle', func_get_args())); } + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -2864,9 +3198,11 @@ public function cantSeeInTitle($title) { * @param $title * * @return mixed + * * @see \Codeception\Lib\InnerBrowser::dontSeeInTitle() */ - public function dontSeeInTitle($title) { + public function dontSeeInTitle($title) + { return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeInTitle', func_get_args())); } } diff --git a/tests/functional/ReadWorkflowWithManyPipesCept.php b/tests/functional/ReadWorkflowWithManyPipesCept.php index 3945a53..8c144a6 100644 --- a/tests/functional/ReadWorkflowWithManyPipesCept.php +++ b/tests/functional/ReadWorkflowWithManyPipesCept.php @@ -1,4 +1,5 @@ -wantTo('see a workflow with many pipes'); @@ -7,4 +8,4 @@ $I->seeDrawingIs('many.stub'); -$I->clearWorkflow('UpdatePost'); \ No newline at end of file +$I->clearWorkflow('UpdatePost'); diff --git a/tests/functional/ReadWorkflowWithNoPipesCept.php b/tests/functional/ReadWorkflowWithNoPipesCept.php index 49500ec..6d8905a 100644 --- a/tests/functional/ReadWorkflowWithNoPipesCept.php +++ b/tests/functional/ReadWorkflowWithNoPipesCept.php @@ -1,4 +1,5 @@ -wantTo('see a workflow with no pipes'); @@ -7,4 +8,4 @@ $I->seeDrawingIs('zero.stub'); -$I->clearWorkflow('UpdatePost'); \ No newline at end of file +$I->clearWorkflow('UpdatePost'); diff --git a/tests/functional/ReadWorkflowWithOnePipeCept.php b/tests/functional/ReadWorkflowWithOnePipeCept.php index c1078c5..54e8532 100644 --- a/tests/functional/ReadWorkflowWithOnePipeCept.php +++ b/tests/functional/ReadWorkflowWithOnePipeCept.php @@ -1,4 +1,5 @@ -wantTo('see a workflow with one pipe'); @@ -7,4 +8,4 @@ $I->seeDrawingIs('one.stub'); -$I->clearWorkflow('UpdatePost'); \ No newline at end of file +$I->clearWorkflow('UpdatePost'); diff --git a/tests/functional/UpdateExistingWorkflowCept.php b/tests/functional/UpdateExistingWorkflowCept.php index 592300a..e9e7d57 100644 --- a/tests/functional/UpdateExistingWorkflowCept.php +++ b/tests/functional/UpdateExistingWorkflowCept.php @@ -1,4 +1,5 @@ -wantTo('update an existing workflow'); @@ -14,4 +15,4 @@ $I->seeInShellOutput('Workflow updated successfully.'); $I->clearWorkflow('LoginUser'); -$I->clearWorkflow('RegisterUser'); \ No newline at end of file +$I->clearWorkflow('RegisterUser'); diff --git a/tests/functional/_bootstrap.php b/tests/functional/_bootstrap.php index 8a88555..62817a5 100644 --- a/tests/functional/_bootstrap.php +++ b/tests/functional/_bootstrap.php @@ -1,2 +1,3 @@ scenario->runStep(new \Codeception\Step\Action('assertEquals', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -51,13 +52,14 @@ public function assertEquals($expected, $actual, $message = null) { * @param $expected * @param $actual * @param string $message + * * @see \Codeception\Module\Asserts::assertNotEquals() */ - public function assertNotEquals($expected, $actual, $message = null) { + public function assertNotEquals($expected, $actual, $message = null) + { return $this->scenario->runStep(new \Codeception\Step\Action('assertNotEquals', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -66,24 +68,25 @@ public function assertNotEquals($expected, $actual, $message = null) { * @param $expected * @param $actual * @param string $message + * * @see \Codeception\Module\Asserts::assertGreaterThan() */ - public function assertGreaterThan($expected, $actual, $message = null) { + public function assertGreaterThan($expected, $actual, $message = null) + { return $this->scenario->runStep(new \Codeception\Step\Action('assertGreaterThan', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * * @deprecated * @see \Codeception\Module\Asserts::assertGreaterThen() */ - public function assertGreaterThen($expected, $actual, $message = null) { + public function assertGreaterThen($expected, $actual, $message = null) + { return $this->scenario->runStep(new \Codeception\Step\Action('assertGreaterThen', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -92,24 +95,25 @@ public function assertGreaterThen($expected, $actual, $message = null) { * @param $expected * @param $actual * @param string $message + * * @see \Codeception\Module\Asserts::assertGreaterThanOrEqual() */ - public function assertGreaterThanOrEqual($expected, $actual, $message = null) { + public function assertGreaterThanOrEqual($expected, $actual, $message = null) + { return $this->scenario->runStep(new \Codeception\Step\Action('assertGreaterThanOrEqual', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * * @deprecated * @see \Codeception\Module\Asserts::assertGreaterThenOrEqual() */ - public function assertGreaterThenOrEqual($expected, $actual, $message = null) { + public function assertGreaterThenOrEqual($expected, $actual, $message = null) + { return $this->scenario->runStep(new \Codeception\Step\Action('assertGreaterThenOrEqual', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -118,13 +122,14 @@ public function assertGreaterThenOrEqual($expected, $actual, $message = null) { * @param $expected * @param $actual * @param string $message + * * @see \Codeception\Module\Asserts::assertLessThan() */ - public function assertLessThan($expected, $actual, $message = null) { + public function assertLessThan($expected, $actual, $message = null) + { return $this->scenario->runStep(new \Codeception\Step\Action('assertLessThan', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -133,13 +138,14 @@ public function assertLessThan($expected, $actual, $message = null) { * @param $expected * @param $actual * @param string $message + * * @see \Codeception\Module\Asserts::assertLessThanOrEqual() */ - public function assertLessThanOrEqual($expected, $actual, $message = null) { + public function assertLessThanOrEqual($expected, $actual, $message = null) + { return $this->scenario->runStep(new \Codeception\Step\Action('assertLessThanOrEqual', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -148,13 +154,14 @@ public function assertLessThanOrEqual($expected, $actual, $message = null) { * @param $needle * @param $haystack * @param string $message + * * @see \Codeception\Module\Asserts::assertContains() */ - public function assertContains($needle, $haystack, $message = null) { + public function assertContains($needle, $haystack, $message = null) + { return $this->scenario->runStep(new \Codeception\Step\Action('assertContains', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -163,13 +170,14 @@ public function assertContains($needle, $haystack, $message = null) { * @param $needle * @param $haystack * @param string $message + * * @see \Codeception\Module\Asserts::assertNotContains() */ - public function assertNotContains($needle, $haystack, $message = null) { + public function assertNotContains($needle, $haystack, $message = null) + { return $this->scenario->runStep(new \Codeception\Step\Action('assertNotContains', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -177,13 +185,14 @@ public function assertNotContains($needle, $haystack, $message = null) { * * @param $actual * @param string $message + * * @see \Codeception\Module\Asserts::assertEmpty() */ - public function assertEmpty($actual, $message = null) { + public function assertEmpty($actual, $message = null) + { return $this->scenario->runStep(new \Codeception\Step\Action('assertEmpty', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -191,13 +200,14 @@ public function assertEmpty($actual, $message = null) { * * @param $actual * @param string $message + * * @see \Codeception\Module\Asserts::assertNotEmpty() */ - public function assertNotEmpty($actual, $message = null) { + public function assertNotEmpty($actual, $message = null) + { return $this->scenario->runStep(new \Codeception\Step\Action('assertNotEmpty', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -205,13 +215,14 @@ public function assertNotEmpty($actual, $message = null) { * * @param $actual * @param string $message + * * @see \Codeception\Module\Asserts::assertNull() */ - public function assertNull($actual, $message = null) { + public function assertNull($actual, $message = null) + { return $this->scenario->runStep(new \Codeception\Step\Action('assertNull', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -219,13 +230,14 @@ public function assertNull($actual, $message = null) { * * @param $actual * @param string $message + * * @see \Codeception\Module\Asserts::assertNotNull() */ - public function assertNotNull($actual, $message = null) { + public function assertNotNull($actual, $message = null) + { return $this->scenario->runStep(new \Codeception\Step\Action('assertNotNull', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -233,13 +245,14 @@ public function assertNotNull($actual, $message = null) { * * @param $condition * @param string $message + * * @see \Codeception\Module\Asserts::assertTrue() */ - public function assertTrue($condition, $message = null) { + public function assertTrue($condition, $message = null) + { return $this->scenario->runStep(new \Codeception\Step\Action('assertTrue', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -247,22 +260,25 @@ public function assertTrue($condition, $message = null) { * * @param $condition * @param string $message + * * @see \Codeception\Module\Asserts::assertFalse() */ - public function assertFalse($condition, $message = null) { + public function assertFalse($condition, $message = null) + { return $this->scenario->runStep(new \Codeception\Step\Action('assertFalse', func_get_args())); } - /** * [!] Method is generated. Documentation taken from corresponding module. * * Fails the test with message. * * @param $message + * * @see \Codeception\Module\Asserts::fail() */ - public function fail($message) { + public function fail($message) + { return $this->scenario->runStep(new \Codeception\Step\Action('fail', func_get_args())); } } diff --git a/tests/unit/_bootstrap.php b/tests/unit/_bootstrap.php index 8a88555..62817a5 100644 --- a/tests/unit/_bootstrap.php +++ b/tests/unit/_bootstrap.php @@ -1,2 +1,3 @@