mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Bug fixes
This commit is contained in:
parent
e587ebb222
commit
96a58ecf16
@ -61,14 +61,6 @@ class ReportController extends BaseController
|
|||||||
$enableChart = true;
|
$enableChart = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
$displayData = [];
|
|
||||||
$exportData = [];
|
|
||||||
$reportTotals = [
|
|
||||||
'amount' => [],
|
|
||||||
'balance' => [],
|
|
||||||
'paid' => [],
|
|
||||||
];
|
|
||||||
|
|
||||||
$dateTypes = [
|
$dateTypes = [
|
||||||
'DAYOFYEAR' => 'Daily',
|
'DAYOFYEAR' => 'Daily',
|
||||||
'WEEK' => 'Weekly',
|
'WEEK' => 'Weekly',
|
||||||
@ -256,6 +248,14 @@ class ReportController extends BaseController
|
|||||||
|
|
||||||
$lastInvoiceId = null;
|
$lastInvoiceId = null;
|
||||||
$sameAsLast = false;
|
$sameAsLast = false;
|
||||||
|
$displayData = [];
|
||||||
|
|
||||||
|
$exportData = [];
|
||||||
|
$reportTotals = [
|
||||||
|
'amount' => [],
|
||||||
|
'balance' => [],
|
||||||
|
'paid' => [],
|
||||||
|
];
|
||||||
|
|
||||||
foreach ($data as $record) {
|
foreach ($data as $record) {
|
||||||
$sameAsLast = ($lastInvoiceId == $record->invoice_public_id);
|
$sameAsLast = ($lastInvoiceId == $record->invoice_public_id);
|
||||||
|
@ -18,7 +18,7 @@ If you'd like to use our code to sell your own invoicing app email us for detail
|
|||||||
### Features
|
### Features
|
||||||
* Built using Laravel 5
|
* Built using Laravel 5
|
||||||
* Live PDF generation using [pdfmake](http://pdfmake.org/)
|
* Live PDF generation using [pdfmake](http://pdfmake.org/)
|
||||||
* Integrates with 30+ payment providers with [OmniPay](https://github.com/thephpleague/omnipay)
|
* Integrates with 50+ payment providers with [OmniPay](https://github.com/thephpleague/omnipay)
|
||||||
* Recurring invoices with auto-billing
|
* Recurring invoices with auto-billing
|
||||||
* Tasks with time-tracking
|
* Tasks with time-tracking
|
||||||
* Multi-user/multi-company support
|
* Multi-user/multi-company support
|
||||||
|
@ -909,5 +909,14 @@
|
|||||||
'archived' => 'Archived',
|
'archived' => 'Archived',
|
||||||
'untitled_account' => 'Untitled Company',
|
'untitled_account' => 'Untitled Company',
|
||||||
|
|
||||||
|
'before' => 'Before',
|
||||||
|
'after' => 'After',
|
||||||
|
'reset_terms_help' => 'Reset to the default account terms',
|
||||||
|
'reset_footer_help' => 'Reset to the default account footer',
|
||||||
|
'export_data' => 'Export Data',
|
||||||
|
'user' => 'User',
|
||||||
|
'country' => 'Country',
|
||||||
|
'include' => 'Include',
|
||||||
|
|
||||||
|
|
||||||
);
|
);
|
||||||
|
@ -911,4 +911,13 @@ return array(
|
|||||||
'archived' => 'Archived',
|
'archived' => 'Archived',
|
||||||
'untitled_account' => 'Untitled Company',
|
'untitled_account' => 'Untitled Company',
|
||||||
|
|
||||||
|
'before' => 'Before',
|
||||||
|
'after' => 'After',
|
||||||
|
'reset_terms_help' => 'Reset to the default account terms',
|
||||||
|
'reset_footer_help' => 'Reset to the default account footer',
|
||||||
|
'export_data' => 'Export Data',
|
||||||
|
'user' => 'User',
|
||||||
|
'country' => 'Country',
|
||||||
|
'include' => 'Include',
|
||||||
|
|
||||||
);
|
);
|
||||||
|
@ -887,5 +887,14 @@ return array(
|
|||||||
'archived' => 'Archived',
|
'archived' => 'Archived',
|
||||||
'untitled_account' => 'Untitled Company',
|
'untitled_account' => 'Untitled Company',
|
||||||
|
|
||||||
|
'before' => 'Before',
|
||||||
|
'after' => 'After',
|
||||||
|
'reset_terms_help' => 'Reset to the default account terms',
|
||||||
|
'reset_footer_help' => 'Reset to the default account footer',
|
||||||
|
'export_data' => 'Export Data',
|
||||||
|
'user' => 'User',
|
||||||
|
'country' => 'Country',
|
||||||
|
'include' => 'Include',
|
||||||
|
|
||||||
|
|
||||||
);
|
);
|
||||||
|
@ -908,4 +908,13 @@ return array(
|
|||||||
'archived' => 'Archived',
|
'archived' => 'Archived',
|
||||||
'untitled_account' => 'Untitled Company',
|
'untitled_account' => 'Untitled Company',
|
||||||
|
|
||||||
|
'before' => 'Before',
|
||||||
|
'after' => 'After',
|
||||||
|
'reset_terms_help' => 'Reset to the default account terms',
|
||||||
|
'reset_footer_help' => 'Reset to the default account footer',
|
||||||
|
'export_data' => 'Export Data',
|
||||||
|
'user' => 'User',
|
||||||
|
'country' => 'Country',
|
||||||
|
'include' => 'Include',
|
||||||
|
|
||||||
);
|
);
|
||||||
|
@ -902,4 +902,13 @@ return array(
|
|||||||
'archived' => 'Archivé',
|
'archived' => 'Archivé',
|
||||||
'untitled_account' => 'Société sans nom',
|
'untitled_account' => 'Société sans nom',
|
||||||
|
|
||||||
|
'before' => 'Before',
|
||||||
|
'after' => 'After',
|
||||||
|
'reset_terms_help' => 'Reset to the default account terms',
|
||||||
|
'reset_footer_help' => 'Reset to the default account footer',
|
||||||
|
'export_data' => 'Export Data',
|
||||||
|
'user' => 'User',
|
||||||
|
'country' => 'Country',
|
||||||
|
'include' => 'Include',
|
||||||
|
|
||||||
);
|
);
|
||||||
|
@ -902,4 +902,13 @@ return array(
|
|||||||
'archived' => 'Archived',
|
'archived' => 'Archived',
|
||||||
'untitled_account' => 'Untitled Company',
|
'untitled_account' => 'Untitled Company',
|
||||||
|
|
||||||
|
'before' => 'Before',
|
||||||
|
'after' => 'After',
|
||||||
|
'reset_terms_help' => 'Reset to the default account terms',
|
||||||
|
'reset_footer_help' => 'Reset to the default account footer',
|
||||||
|
'export_data' => 'Export Data',
|
||||||
|
'user' => 'User',
|
||||||
|
'country' => 'Country',
|
||||||
|
'include' => 'Include',
|
||||||
|
|
||||||
);
|
);
|
||||||
|
@ -904,4 +904,13 @@ return array(
|
|||||||
'archived' => 'Archived',
|
'archived' => 'Archived',
|
||||||
'untitled_account' => 'Untitled Company',
|
'untitled_account' => 'Untitled Company',
|
||||||
|
|
||||||
|
'before' => 'Before',
|
||||||
|
'after' => 'After',
|
||||||
|
'reset_terms_help' => 'Reset to the default account terms',
|
||||||
|
'reset_footer_help' => 'Reset to the default account footer',
|
||||||
|
'export_data' => 'Export Data',
|
||||||
|
'user' => 'User',
|
||||||
|
'country' => 'Country',
|
||||||
|
'include' => 'Include',
|
||||||
|
|
||||||
);
|
);
|
||||||
|
@ -911,5 +911,14 @@ return array(
|
|||||||
'archived' => 'Archived',
|
'archived' => 'Archived',
|
||||||
'untitled_account' => 'Untitled Company',
|
'untitled_account' => 'Untitled Company',
|
||||||
|
|
||||||
|
'before' => 'Before',
|
||||||
|
'after' => 'After',
|
||||||
|
'reset_terms_help' => 'Reset to the default account terms',
|
||||||
|
'reset_footer_help' => 'Reset to the default account footer',
|
||||||
|
'export_data' => 'Export Data',
|
||||||
|
'user' => 'User',
|
||||||
|
'country' => 'Country',
|
||||||
|
'include' => 'Include',
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -909,4 +909,13 @@ return array(
|
|||||||
'archived' => 'Arkivert',
|
'archived' => 'Arkivert',
|
||||||
'untitled_account' => 'Selskap Uten Navn',
|
'untitled_account' => 'Selskap Uten Navn',
|
||||||
|
|
||||||
|
'before' => 'Before',
|
||||||
|
'after' => 'After',
|
||||||
|
'reset_terms_help' => 'Reset to the default account terms',
|
||||||
|
'reset_footer_help' => 'Reset to the default account footer',
|
||||||
|
'export_data' => 'Export Data',
|
||||||
|
'user' => 'User',
|
||||||
|
'country' => 'Country',
|
||||||
|
'include' => 'Include',
|
||||||
|
|
||||||
);
|
);
|
||||||
|
@ -904,4 +904,13 @@ return array(
|
|||||||
'archived' => 'Archived',
|
'archived' => 'Archived',
|
||||||
'untitled_account' => 'Untitled Company',
|
'untitled_account' => 'Untitled Company',
|
||||||
|
|
||||||
|
'before' => 'Before',
|
||||||
|
'after' => 'After',
|
||||||
|
'reset_terms_help' => 'Reset to the default account terms',
|
||||||
|
'reset_footer_help' => 'Reset to the default account footer',
|
||||||
|
'export_data' => 'Export Data',
|
||||||
|
'user' => 'User',
|
||||||
|
'country' => 'Country',
|
||||||
|
'include' => 'Include',
|
||||||
|
|
||||||
);
|
);
|
||||||
|
@ -906,4 +906,12 @@ return array(
|
|||||||
|
|
||||||
'before' => 'Antes',
|
'before' => 'Antes',
|
||||||
'after' => 'Depois',
|
'after' => 'Depois',
|
||||||
|
'reset_terms_help' => 'Reset to the default account terms',
|
||||||
|
'reset_footer_help' => 'Reset to the default account footer',
|
||||||
|
'export_data' => 'Export Data',
|
||||||
|
'user' => 'User',
|
||||||
|
'country' => 'Country',
|
||||||
|
'include' => 'Include',
|
||||||
|
|
||||||
|
|
||||||
);
|
);
|
||||||
|
@ -907,4 +907,13 @@ return array(
|
|||||||
'archived' => 'Archived',
|
'archived' => 'Archived',
|
||||||
'untitled_account' => 'Untitled Company',
|
'untitled_account' => 'Untitled Company',
|
||||||
|
|
||||||
|
'before' => 'Before',
|
||||||
|
'after' => 'After',
|
||||||
|
'reset_terms_help' => 'Reset to the default account terms',
|
||||||
|
'reset_footer_help' => 'Reset to the default account footer',
|
||||||
|
'export_data' => 'Export Data',
|
||||||
|
'user' => 'User',
|
||||||
|
'country' => 'Country',
|
||||||
|
'include' => 'Include',
|
||||||
|
|
||||||
);
|
);
|
||||||
|
@ -161,6 +161,7 @@
|
|||||||
$('#action').val('');
|
$('#action').val('');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@if ($enableChart)
|
||||||
var ctx = document.getElementById('monthly-reports').getContext('2d');
|
var ctx = document.getElementById('monthly-reports').getContext('2d');
|
||||||
var chart = {
|
var chart = {
|
||||||
labels: {!! json_encode($labels) !!},
|
labels: {!! json_encode($labels) !!},
|
||||||
@ -183,6 +184,9 @@
|
|||||||
scaleLabel : "<%=value%>",
|
scaleLabel : "<%=value%>",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
new Chart(ctx).{!! $chartType !!}(chart, options);
|
||||||
|
@endif
|
||||||
|
|
||||||
$(function() {
|
$(function() {
|
||||||
$('.start_date .input-group-addon').click(function() {
|
$('.start_date .input-group-addon').click(function() {
|
||||||
toggleDatePicker('start_date');
|
toggleDatePicker('start_date');
|
||||||
@ -192,7 +196,6 @@
|
|||||||
});
|
});
|
||||||
})
|
})
|
||||||
|
|
||||||
new Chart(ctx).{!! $chartType !!}(chart, options);
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?php //[STAMP] 69e45a9997e207a2465b88d46d4f9fcb
|
<?php //[STAMP] f6d69edc5937bdfc3f7eeb6538ccd9ba
|
||||||
namespace _generated;
|
namespace _generated;
|
||||||
|
|
||||||
// This class was automatically generated by build task
|
// This class was automatically generated by build task
|
||||||
@ -17,6 +17,17 @@ trait AcceptanceTesterActions
|
|||||||
abstract protected function getScenario();
|
abstract protected function getScenario();
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* [!] Method is generated. Documentation taken from corresponding module.
|
||||||
|
*
|
||||||
|
* Print out latest Selenium Logs in debug mode
|
||||||
|
* @see \Codeception\Module\WebDriver::debugWebDriverLogs()
|
||||||
|
*/
|
||||||
|
public function debugWebDriverLogs() {
|
||||||
|
return $this->getScenario()->runStep(new \Codeception\Step\Action('debugWebDriverLogs', func_get_args()));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* [!] Method is generated. Documentation taken from corresponding module.
|
* [!] Method is generated. Documentation taken from corresponding module.
|
||||||
*
|
*
|
||||||
@ -249,7 +260,6 @@ trait AcceptanceTesterActions
|
|||||||
* $I->amOnPage('/');
|
* $I->amOnPage('/');
|
||||||
* // opens /register page
|
* // opens /register page
|
||||||
* $I->amOnPage('/register');
|
* $I->amOnPage('/register');
|
||||||
* ?>
|
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
* @param $page
|
* @param $page
|
||||||
@ -263,17 +273,32 @@ trait AcceptanceTesterActions
|
|||||||
/**
|
/**
|
||||||
* [!] Method is generated. Documentation taken from corresponding module.
|
* [!] Method is generated. Documentation taken from corresponding module.
|
||||||
*
|
*
|
||||||
* Checks that the current page contains the given string.
|
* Checks that the current page contains the given string (case insensitive).
|
||||||
* Specify a locator as the second parameter to match a specific region.
|
*
|
||||||
|
* You can specify a specific HTML element (via CSS or XPath) as the second
|
||||||
|
* parameter to only search within that element.
|
||||||
*
|
*
|
||||||
* ``` php
|
* ``` php
|
||||||
* <?php
|
* <?php
|
||||||
* $I->see('Logout'); // I can suppose user is logged in
|
* $I->see('Logout'); // I can suppose user is logged in
|
||||||
* $I->see('Sign Up', 'h1'); // I can suppose it's a signup page
|
* $I->see('Sign Up', 'h1'); // I can suppose it's a signup page
|
||||||
* $I->see('Sign Up', '//body/h1'); // with XPath
|
* $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:
|
||||||
|
*
|
||||||
|
* - `<p>I am Stronger than thou</p>`
|
||||||
|
* - `<script>document.createElement('strong');</script>`
|
||||||
|
*
|
||||||
|
* But will *not* be true for strings like:
|
||||||
|
*
|
||||||
|
* - `<strong>Home</strong>`
|
||||||
|
* - `<div class="strong">Home</strong>`
|
||||||
|
* - `<!-- strong -->`
|
||||||
|
*
|
||||||
|
* For checking the raw source code, use `seeInSource()`.
|
||||||
|
*
|
||||||
* @param $text
|
* @param $text
|
||||||
* @param null $selector
|
* @param null $selector
|
||||||
* Conditional Assertion: Test won't be stopped on fail
|
* Conditional Assertion: Test won't be stopped on fail
|
||||||
@ -285,17 +310,32 @@ trait AcceptanceTesterActions
|
|||||||
/**
|
/**
|
||||||
* [!] Method is generated. Documentation taken from corresponding module.
|
* [!] Method is generated. Documentation taken from corresponding module.
|
||||||
*
|
*
|
||||||
* Checks that the current page contains the given string.
|
* Checks that the current page contains the given string (case insensitive).
|
||||||
* Specify a locator as the second parameter to match a specific region.
|
*
|
||||||
|
* You can specify a specific HTML element (via CSS or XPath) as the second
|
||||||
|
* parameter to only search within that element.
|
||||||
*
|
*
|
||||||
* ``` php
|
* ``` php
|
||||||
* <?php
|
* <?php
|
||||||
* $I->see('Logout'); // I can suppose user is logged in
|
* $I->see('Logout'); // I can suppose user is logged in
|
||||||
* $I->see('Sign Up', 'h1'); // I can suppose it's a signup page
|
* $I->see('Sign Up', 'h1'); // I can suppose it's a signup page
|
||||||
* $I->see('Sign Up', '//body/h1'); // with XPath
|
* $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:
|
||||||
|
*
|
||||||
|
* - `<p>I am Stronger than thou</p>`
|
||||||
|
* - `<script>document.createElement('strong');</script>`
|
||||||
|
*
|
||||||
|
* But will *not* be true for strings like:
|
||||||
|
*
|
||||||
|
* - `<strong>Home</strong>`
|
||||||
|
* - `<div class="strong">Home</strong>`
|
||||||
|
* - `<!-- strong -->`
|
||||||
|
*
|
||||||
|
* For checking the raw source code, use `seeInSource()`.
|
||||||
|
*
|
||||||
* @param $text
|
* @param $text
|
||||||
* @param null $selector
|
* @param null $selector
|
||||||
* @see \Codeception\Module\WebDriver::see()
|
* @see \Codeception\Module\WebDriver::see()
|
||||||
@ -308,7 +348,7 @@ trait AcceptanceTesterActions
|
|||||||
/**
|
/**
|
||||||
* [!] Method is generated. Documentation taken from corresponding module.
|
* [!] Method is generated. Documentation taken from corresponding module.
|
||||||
*
|
*
|
||||||
* Checks that the current page doesn't contain the text specified.
|
* Checks that the current page doesn't contain the text specified (case insensitive).
|
||||||
* Give a locator as the second parameter to match a specific region.
|
* Give a locator as the second parameter to match a specific region.
|
||||||
*
|
*
|
||||||
* ```php
|
* ```php
|
||||||
@ -316,9 +356,22 @@ trait AcceptanceTesterActions
|
|||||||
* $I->dontSee('Login'); // I can suppose user is already logged in
|
* $I->dontSee('Login'); // I can suppose user is already logged in
|
||||||
* $I->dontSee('Sign Up','h1'); // I can suppose it's not a signup page
|
* $I->dontSee('Sign Up','h1'); // I can suppose it's not a signup page
|
||||||
* $I->dontSee('Sign Up','//body/h1'); // with XPath
|
* $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:
|
||||||
|
*
|
||||||
|
* - `<p>I am Stronger than thou</p>`
|
||||||
|
* - `<script>document.createElement('strong');</script>`
|
||||||
|
*
|
||||||
|
* But will ignore strings like:
|
||||||
|
*
|
||||||
|
* - `<strong>Home</strong>`
|
||||||
|
* - `<div class="strong">Home</strong>`
|
||||||
|
* - `<!-- strong -->`
|
||||||
|
*
|
||||||
|
* For checking the raw source code, use `seeInSource()`.
|
||||||
|
*
|
||||||
* @param $text
|
* @param $text
|
||||||
* @param null $selector
|
* @param null $selector
|
||||||
* Conditional Assertion: Test won't be stopped on fail
|
* Conditional Assertion: Test won't be stopped on fail
|
||||||
@ -330,7 +383,7 @@ trait AcceptanceTesterActions
|
|||||||
/**
|
/**
|
||||||
* [!] Method is generated. Documentation taken from corresponding module.
|
* [!] Method is generated. Documentation taken from corresponding module.
|
||||||
*
|
*
|
||||||
* Checks that the current page doesn't contain the text specified.
|
* Checks that the current page doesn't contain the text specified (case insensitive).
|
||||||
* Give a locator as the second parameter to match a specific region.
|
* Give a locator as the second parameter to match a specific region.
|
||||||
*
|
*
|
||||||
* ```php
|
* ```php
|
||||||
@ -338,9 +391,22 @@ trait AcceptanceTesterActions
|
|||||||
* $I->dontSee('Login'); // I can suppose user is already logged in
|
* $I->dontSee('Login'); // I can suppose user is already logged in
|
||||||
* $I->dontSee('Sign Up','h1'); // I can suppose it's not a signup page
|
* $I->dontSee('Sign Up','h1'); // I can suppose it's not a signup page
|
||||||
* $I->dontSee('Sign Up','//body/h1'); // with XPath
|
* $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:
|
||||||
|
*
|
||||||
|
* - `<p>I am Stronger than thou</p>`
|
||||||
|
* - `<script>document.createElement('strong');</script>`
|
||||||
|
*
|
||||||
|
* But will ignore strings like:
|
||||||
|
*
|
||||||
|
* - `<strong>Home</strong>`
|
||||||
|
* - `<div class="strong">Home</strong>`
|
||||||
|
* - `<!-- strong -->`
|
||||||
|
*
|
||||||
|
* For checking the raw source code, use `seeInSource()`.
|
||||||
|
*
|
||||||
* @param $text
|
* @param $text
|
||||||
* @param null $selector
|
* @param null $selector
|
||||||
* @see \Codeception\Module\WebDriver::dontSee()
|
* @see \Codeception\Module\WebDriver::dontSee()
|
||||||
@ -350,6 +416,80 @@ trait AcceptanceTesterActions
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* [!] Method is generated. Documentation taken from corresponding module.
|
||||||
|
*
|
||||||
|
* Checks that the current page contains the given string in its
|
||||||
|
* raw source code.
|
||||||
|
*
|
||||||
|
* ``` php
|
||||||
|
* <?php
|
||||||
|
* $I->seeInSource('<h1>Green eggs & ham</h1>');
|
||||||
|
* ```
|
||||||
|
*
|
||||||
|
* @param $raw
|
||||||
|
* Conditional Assertion: Test won't be stopped on fail
|
||||||
|
* @see \Codeception\Module\WebDriver::seeInSource()
|
||||||
|
*/
|
||||||
|
public function canSeeInSource($raw) {
|
||||||
|
return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeInSource', func_get_args()));
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* [!] Method is generated. Documentation taken from corresponding module.
|
||||||
|
*
|
||||||
|
* Checks that the current page contains the given string in its
|
||||||
|
* raw source code.
|
||||||
|
*
|
||||||
|
* ``` php
|
||||||
|
* <?php
|
||||||
|
* $I->seeInSource('<h1>Green eggs & ham</h1>');
|
||||||
|
* ```
|
||||||
|
*
|
||||||
|
* @param $raw
|
||||||
|
* @see \Codeception\Module\WebDriver::seeInSource()
|
||||||
|
*/
|
||||||
|
public function seeInSource($raw) {
|
||||||
|
return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeInSource', func_get_args()));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* [!] Method is generated. Documentation taken from corresponding module.
|
||||||
|
*
|
||||||
|
* Checks that the current page contains the given string in its
|
||||||
|
* raw source code.
|
||||||
|
*
|
||||||
|
* ```php
|
||||||
|
* <?php
|
||||||
|
* $I->dontSeeInSource('<h1>Green eggs & ham</h1>');
|
||||||
|
* ```
|
||||||
|
*
|
||||||
|
* @param $raw
|
||||||
|
* Conditional Assertion: Test won't be stopped on fail
|
||||||
|
* @see \Codeception\Module\WebDriver::dontSeeInSource()
|
||||||
|
*/
|
||||||
|
public function cantSeeInSource($raw) {
|
||||||
|
return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInSource', func_get_args()));
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* [!] Method is generated. Documentation taken from corresponding module.
|
||||||
|
*
|
||||||
|
* Checks that the current page contains the given string in its
|
||||||
|
* raw source code.
|
||||||
|
*
|
||||||
|
* ```php
|
||||||
|
* <?php
|
||||||
|
* $I->dontSeeInSource('<h1>Green eggs & ham</h1>');
|
||||||
|
* ```
|
||||||
|
*
|
||||||
|
* @param $raw
|
||||||
|
* @see \Codeception\Module\WebDriver::dontSeeInSource()
|
||||||
|
*/
|
||||||
|
public function dontSeeInSource($raw) {
|
||||||
|
return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeInSource', func_get_args()));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* [!] Method is generated. Documentation taken from corresponding module.
|
* [!] Method is generated. Documentation taken from corresponding module.
|
||||||
*
|
*
|
||||||
@ -2528,7 +2668,7 @@ trait AcceptanceTesterActions
|
|||||||
/**
|
/**
|
||||||
* [!] Method is generated. Documentation taken from corresponding module.
|
* [!] Method is generated. Documentation taken from corresponding module.
|
||||||
*
|
*
|
||||||
* Inserts SQL record into database. This record will be erased after the test.
|
* Inserts an SQL record into a database. This record will be erased after the test.
|
||||||
*
|
*
|
||||||
* ``` php
|
* ``` php
|
||||||
* <?php
|
* <?php
|
||||||
@ -2550,7 +2690,7 @@ trait AcceptanceTesterActions
|
|||||||
/**
|
/**
|
||||||
* [!] Method is generated. Documentation taken from corresponding module.
|
* [!] Method is generated. Documentation taken from corresponding module.
|
||||||
*
|
*
|
||||||
* Checks if a row with given column values exists.
|
* Asserts that a row with the given column values exists.
|
||||||
* Provide table name and column values.
|
* Provide table name and column values.
|
||||||
*
|
*
|
||||||
* Example:
|
* Example:
|
||||||
@ -2578,7 +2718,7 @@ trait AcceptanceTesterActions
|
|||||||
/**
|
/**
|
||||||
* [!] Method is generated. Documentation taken from corresponding module.
|
* [!] Method is generated. Documentation taken from corresponding module.
|
||||||
*
|
*
|
||||||
* Checks if a row with given column values exists.
|
* Asserts that a row with the given column values exists.
|
||||||
* Provide table name and column values.
|
* Provide table name and column values.
|
||||||
*
|
*
|
||||||
* Example:
|
* Example:
|
||||||
@ -2607,7 +2747,7 @@ trait AcceptanceTesterActions
|
|||||||
/**
|
/**
|
||||||
* [!] Method is generated. Documentation taken from corresponding module.
|
* [!] Method is generated. Documentation taken from corresponding module.
|
||||||
*
|
*
|
||||||
* Asserts that found number of records in database
|
* Asserts that the given number of records were found in the database.
|
||||||
*
|
*
|
||||||
* ``` php
|
* ``` php
|
||||||
* <?php
|
* <?php
|
||||||
@ -2627,7 +2767,7 @@ trait AcceptanceTesterActions
|
|||||||
/**
|
/**
|
||||||
* [!] Method is generated. Documentation taken from corresponding module.
|
* [!] Method is generated. Documentation taken from corresponding module.
|
||||||
*
|
*
|
||||||
* Asserts that found number of records in database
|
* Asserts that the given number of records were found in the database.
|
||||||
*
|
*
|
||||||
* ``` php
|
* ``` php
|
||||||
* <?php
|
* <?php
|
||||||
@ -2650,7 +2790,7 @@ trait AcceptanceTesterActions
|
|||||||
*
|
*
|
||||||
* Effect is opposite to ->seeInDatabase
|
* Effect is opposite to ->seeInDatabase
|
||||||
*
|
*
|
||||||
* Checks if there is no record with such column values in database.
|
* Asserts that there is no record with the given column values in a database.
|
||||||
* Provide table name and column values.
|
* Provide table name and column values.
|
||||||
*
|
*
|
||||||
* Example:
|
* Example:
|
||||||
@ -2680,7 +2820,7 @@ trait AcceptanceTesterActions
|
|||||||
*
|
*
|
||||||
* Effect is opposite to ->seeInDatabase
|
* Effect is opposite to ->seeInDatabase
|
||||||
*
|
*
|
||||||
* Checks if there is no record with such column values in database.
|
* Asserts that there is no record with the given column values in a database.
|
||||||
* Provide table name and column values.
|
* Provide table name and column values.
|
||||||
*
|
*
|
||||||
* Example:
|
* Example:
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?php //[STAMP] 62f79ae9e6d23b1ab98027060c9e03e4
|
<?php //[STAMP] a0d5cd84d7074a41bde1bd3fc123f1cf
|
||||||
namespace _generated;
|
namespace _generated;
|
||||||
|
|
||||||
// This class was automatically generated by build task
|
// This class was automatically generated by build task
|
||||||
@ -164,7 +164,6 @@ trait FunctionalTesterActions
|
|||||||
* $I->amOnPage('/');
|
* $I->amOnPage('/');
|
||||||
* // opens /register page
|
* // opens /register page
|
||||||
* $I->amOnPage('/register');
|
* $I->amOnPage('/register');
|
||||||
* ?>
|
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
* @param $page
|
* @param $page
|
||||||
@ -217,17 +216,32 @@ trait FunctionalTesterActions
|
|||||||
/**
|
/**
|
||||||
* [!] Method is generated. Documentation taken from corresponding module.
|
* [!] Method is generated. Documentation taken from corresponding module.
|
||||||
*
|
*
|
||||||
* Checks that the current page contains the given string.
|
* Checks that the current page contains the given string (case insensitive).
|
||||||
* Specify a locator as the second parameter to match a specific region.
|
*
|
||||||
|
* You can specify a specific HTML element (via CSS or XPath) as the second
|
||||||
|
* parameter to only search within that element.
|
||||||
*
|
*
|
||||||
* ``` php
|
* ``` php
|
||||||
* <?php
|
* <?php
|
||||||
* $I->see('Logout'); // I can suppose user is logged in
|
* $I->see('Logout'); // I can suppose user is logged in
|
||||||
* $I->see('Sign Up', 'h1'); // I can suppose it's a signup page
|
* $I->see('Sign Up', 'h1'); // I can suppose it's a signup page
|
||||||
* $I->see('Sign Up', '//body/h1'); // with XPath
|
* $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:
|
||||||
|
*
|
||||||
|
* - `<p>I am Stronger than thou</p>`
|
||||||
|
* - `<script>document.createElement('strong');</script>`
|
||||||
|
*
|
||||||
|
* But will *not* be true for strings like:
|
||||||
|
*
|
||||||
|
* - `<strong>Home</strong>`
|
||||||
|
* - `<div class="strong">Home</strong>`
|
||||||
|
* - `<!-- strong -->`
|
||||||
|
*
|
||||||
|
* For checking the raw source code, use `seeInSource()`.
|
||||||
|
*
|
||||||
* @param $text
|
* @param $text
|
||||||
* @param null $selector
|
* @param null $selector
|
||||||
* Conditional Assertion: Test won't be stopped on fail
|
* Conditional Assertion: Test won't be stopped on fail
|
||||||
@ -239,17 +253,32 @@ trait FunctionalTesterActions
|
|||||||
/**
|
/**
|
||||||
* [!] Method is generated. Documentation taken from corresponding module.
|
* [!] Method is generated. Documentation taken from corresponding module.
|
||||||
*
|
*
|
||||||
* Checks that the current page contains the given string.
|
* Checks that the current page contains the given string (case insensitive).
|
||||||
* Specify a locator as the second parameter to match a specific region.
|
*
|
||||||
|
* You can specify a specific HTML element (via CSS or XPath) as the second
|
||||||
|
* parameter to only search within that element.
|
||||||
*
|
*
|
||||||
* ``` php
|
* ``` php
|
||||||
* <?php
|
* <?php
|
||||||
* $I->see('Logout'); // I can suppose user is logged in
|
* $I->see('Logout'); // I can suppose user is logged in
|
||||||
* $I->see('Sign Up', 'h1'); // I can suppose it's a signup page
|
* $I->see('Sign Up', 'h1'); // I can suppose it's a signup page
|
||||||
* $I->see('Sign Up', '//body/h1'); // with XPath
|
* $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:
|
||||||
|
*
|
||||||
|
* - `<p>I am Stronger than thou</p>`
|
||||||
|
* - `<script>document.createElement('strong');</script>`
|
||||||
|
*
|
||||||
|
* But will *not* be true for strings like:
|
||||||
|
*
|
||||||
|
* - `<strong>Home</strong>`
|
||||||
|
* - `<div class="strong">Home</strong>`
|
||||||
|
* - `<!-- strong -->`
|
||||||
|
*
|
||||||
|
* For checking the raw source code, use `seeInSource()`.
|
||||||
|
*
|
||||||
* @param $text
|
* @param $text
|
||||||
* @param null $selector
|
* @param null $selector
|
||||||
* @see \Codeception\Lib\InnerBrowser::see()
|
* @see \Codeception\Lib\InnerBrowser::see()
|
||||||
@ -262,7 +291,7 @@ trait FunctionalTesterActions
|
|||||||
/**
|
/**
|
||||||
* [!] Method is generated. Documentation taken from corresponding module.
|
* [!] Method is generated. Documentation taken from corresponding module.
|
||||||
*
|
*
|
||||||
* Checks that the current page doesn't contain the text specified.
|
* Checks that the current page doesn't contain the text specified (case insensitive).
|
||||||
* Give a locator as the second parameter to match a specific region.
|
* Give a locator as the second parameter to match a specific region.
|
||||||
*
|
*
|
||||||
* ```php
|
* ```php
|
||||||
@ -270,9 +299,22 @@ trait FunctionalTesterActions
|
|||||||
* $I->dontSee('Login'); // I can suppose user is already logged in
|
* $I->dontSee('Login'); // I can suppose user is already logged in
|
||||||
* $I->dontSee('Sign Up','h1'); // I can suppose it's not a signup page
|
* $I->dontSee('Sign Up','h1'); // I can suppose it's not a signup page
|
||||||
* $I->dontSee('Sign Up','//body/h1'); // with XPath
|
* $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:
|
||||||
|
*
|
||||||
|
* - `<p>I am Stronger than thou</p>`
|
||||||
|
* - `<script>document.createElement('strong');</script>`
|
||||||
|
*
|
||||||
|
* But will ignore strings like:
|
||||||
|
*
|
||||||
|
* - `<strong>Home</strong>`
|
||||||
|
* - `<div class="strong">Home</strong>`
|
||||||
|
* - `<!-- strong -->`
|
||||||
|
*
|
||||||
|
* For checking the raw source code, use `seeInSource()`.
|
||||||
|
*
|
||||||
* @param $text
|
* @param $text
|
||||||
* @param null $selector
|
* @param null $selector
|
||||||
* Conditional Assertion: Test won't be stopped on fail
|
* Conditional Assertion: Test won't be stopped on fail
|
||||||
@ -284,7 +326,7 @@ trait FunctionalTesterActions
|
|||||||
/**
|
/**
|
||||||
* [!] Method is generated. Documentation taken from corresponding module.
|
* [!] Method is generated. Documentation taken from corresponding module.
|
||||||
*
|
*
|
||||||
* Checks that the current page doesn't contain the text specified.
|
* Checks that the current page doesn't contain the text specified (case insensitive).
|
||||||
* Give a locator as the second parameter to match a specific region.
|
* Give a locator as the second parameter to match a specific region.
|
||||||
*
|
*
|
||||||
* ```php
|
* ```php
|
||||||
@ -292,9 +334,22 @@ trait FunctionalTesterActions
|
|||||||
* $I->dontSee('Login'); // I can suppose user is already logged in
|
* $I->dontSee('Login'); // I can suppose user is already logged in
|
||||||
* $I->dontSee('Sign Up','h1'); // I can suppose it's not a signup page
|
* $I->dontSee('Sign Up','h1'); // I can suppose it's not a signup page
|
||||||
* $I->dontSee('Sign Up','//body/h1'); // with XPath
|
* $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:
|
||||||
|
*
|
||||||
|
* - `<p>I am Stronger than thou</p>`
|
||||||
|
* - `<script>document.createElement('strong');</script>`
|
||||||
|
*
|
||||||
|
* But will ignore strings like:
|
||||||
|
*
|
||||||
|
* - `<strong>Home</strong>`
|
||||||
|
* - `<div class="strong">Home</strong>`
|
||||||
|
* - `<!-- strong -->`
|
||||||
|
*
|
||||||
|
* For checking the raw source code, use `seeInSource()`.
|
||||||
|
*
|
||||||
* @param $text
|
* @param $text
|
||||||
* @param null $selector
|
* @param null $selector
|
||||||
* @see \Codeception\Lib\InnerBrowser::dontSee()
|
* @see \Codeception\Lib\InnerBrowser::dontSee()
|
||||||
@ -304,6 +359,80 @@ trait FunctionalTesterActions
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* [!] Method is generated. Documentation taken from corresponding module.
|
||||||
|
*
|
||||||
|
* Checks that the current page contains the given string in its
|
||||||
|
* raw source code.
|
||||||
|
*
|
||||||
|
* ``` php
|
||||||
|
* <?php
|
||||||
|
* $I->seeInSource('<h1>Green eggs & ham</h1>');
|
||||||
|
* ```
|
||||||
|
*
|
||||||
|
* @param $raw
|
||||||
|
* Conditional Assertion: Test won't be stopped on fail
|
||||||
|
* @see \Codeception\Lib\InnerBrowser::seeInSource()
|
||||||
|
*/
|
||||||
|
public function canSeeInSource($raw) {
|
||||||
|
return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeInSource', func_get_args()));
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* [!] Method is generated. Documentation taken from corresponding module.
|
||||||
|
*
|
||||||
|
* Checks that the current page contains the given string in its
|
||||||
|
* raw source code.
|
||||||
|
*
|
||||||
|
* ``` php
|
||||||
|
* <?php
|
||||||
|
* $I->seeInSource('<h1>Green eggs & ham</h1>');
|
||||||
|
* ```
|
||||||
|
*
|
||||||
|
* @param $raw
|
||||||
|
* @see \Codeception\Lib\InnerBrowser::seeInSource()
|
||||||
|
*/
|
||||||
|
public function seeInSource($raw) {
|
||||||
|
return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeInSource', func_get_args()));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* [!] Method is generated. Documentation taken from corresponding module.
|
||||||
|
*
|
||||||
|
* Checks that the current page contains the given string in its
|
||||||
|
* raw source code.
|
||||||
|
*
|
||||||
|
* ```php
|
||||||
|
* <?php
|
||||||
|
* $I->dontSeeInSource('<h1>Green eggs & ham</h1>');
|
||||||
|
* ```
|
||||||
|
*
|
||||||
|
* @param $raw
|
||||||
|
* Conditional Assertion: Test won't be stopped on fail
|
||||||
|
* @see \Codeception\Lib\InnerBrowser::dontSeeInSource()
|
||||||
|
*/
|
||||||
|
public function cantSeeInSource($raw) {
|
||||||
|
return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInSource', func_get_args()));
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* [!] Method is generated. Documentation taken from corresponding module.
|
||||||
|
*
|
||||||
|
* Checks that the current page contains the given string in its
|
||||||
|
* raw source code.
|
||||||
|
*
|
||||||
|
* ```php
|
||||||
|
* <?php
|
||||||
|
* $I->dontSeeInSource('<h1>Green eggs & ham</h1>');
|
||||||
|
* ```
|
||||||
|
*
|
||||||
|
* @param $raw
|
||||||
|
* @see \Codeception\Lib\InnerBrowser::dontSeeInSource()
|
||||||
|
*/
|
||||||
|
public function dontSeeInSource($raw) {
|
||||||
|
return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeInSource', func_get_args()));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* [!] Method is generated. Documentation taken from corresponding module.
|
* [!] Method is generated. Documentation taken from corresponding module.
|
||||||
*
|
*
|
||||||
@ -1076,13 +1205,25 @@ trait FunctionalTesterActions
|
|||||||
* Submits the given form on the page, optionally with the given form
|
* Submits the given form on the page, optionally with the given form
|
||||||
* values. Give the form fields values as an array.
|
* values. Give the form fields values as an array.
|
||||||
*
|
*
|
||||||
* Skipped fields will be filled by their values from the page.
|
* 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,
|
||||||
|
* or from any previous calls to `fillField()`, `selectOption()` etc.
|
||||||
* You don't need to click the 'Submit' button afterwards.
|
* You don't need to click the 'Submit' button afterwards.
|
||||||
* This command itself triggers the request to form's action.
|
* This command itself triggers the request to form's action.
|
||||||
*
|
*
|
||||||
* You can optionally specify what button's value to include
|
* You can optionally specify which button's value to include
|
||||||
* in the request with the last parameter as an alternative to
|
* in the request with the last parameter (as an alternative to
|
||||||
* explicitly setting its value in the second parameter, as
|
* explicitly setting its value in the second parameter), as
|
||||||
* button values are not otherwise included in the request.
|
* button values are not otherwise included in the request.
|
||||||
*
|
*
|
||||||
* Examples:
|
* Examples:
|
||||||
@ -1156,7 +1297,8 @@ trait FunctionalTesterActions
|
|||||||
* );
|
* );
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
* Pair this with seeInFormFields for quick testing magic.
|
* This function works well when paired with `seeInFormFields()`
|
||||||
|
* for quickly testing CRUD interfaces and form validation logic.
|
||||||
*
|
*
|
||||||
* ``` php
|
* ``` php
|
||||||
* <?php
|
* <?php
|
||||||
@ -1166,15 +1308,14 @@ trait FunctionalTesterActions
|
|||||||
* 'checkbox1' => true,
|
* 'checkbox1' => true,
|
||||||
* // ...
|
* // ...
|
||||||
* ];
|
* ];
|
||||||
* $I->submitForm('//form[@id=my-form]', $form, 'submitButton');
|
* $I->submitForm('#my-form', $form, 'submitButton');
|
||||||
* // $I->amOnPage('/path/to/form-page') may be needed
|
* // $I->amOnPage('/path/to/form-page') may be needed
|
||||||
* $I->seeInFormFields('//form[@id=my-form]', $form);
|
* $I->seeInFormFields('#my-form', $form);
|
||||||
* ?>
|
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
* Parameter values can be set to arrays for multiple input fields
|
* Parameter values can be set to arrays for multiple input fields
|
||||||
* of the same name, or multi-select combo boxes. For checkboxes,
|
* of the same name, or multi-select combo boxes. For checkboxes,
|
||||||
* either the string value can be used, or boolean values which will
|
* you can use either the string value or boolean `true`/`false` which will
|
||||||
* be replaced by the checkbox's value in the DOM.
|
* be replaced by the checkbox's value in the DOM.
|
||||||
*
|
*
|
||||||
* ``` php
|
* ``` php
|
||||||
@ -1183,7 +1324,7 @@ trait FunctionalTesterActions
|
|||||||
* 'field1' => 'value',
|
* 'field1' => 'value',
|
||||||
* 'checkbox' => [
|
* 'checkbox' => [
|
||||||
* 'value of first checkbox',
|
* 'value of first checkbox',
|
||||||
* 'value of second checkbox,
|
* 'value of second checkbox',
|
||||||
* ],
|
* ],
|
||||||
* 'otherCheckboxes' => [
|
* 'otherCheckboxes' => [
|
||||||
* true,
|
* true,
|
||||||
@ -1195,17 +1336,18 @@ trait FunctionalTesterActions
|
|||||||
* 'second option value'
|
* 'second option value'
|
||||||
* ]
|
* ]
|
||||||
* ]);
|
* ]);
|
||||||
* ?>
|
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
* Mixing string and boolean values for a checkbox's value is not supported
|
* Mixing string and boolean values for a checkbox's value is not supported
|
||||||
* and may produce unexpected results.
|
* and may produce unexpected results.
|
||||||
*
|
*
|
||||||
* Field names ending in "[]" must be passed without the trailing square
|
* Field names ending in `[]` must be passed without the trailing square
|
||||||
* bracket characters, and must contain an array for its value. This allows
|
* bracket characters, and must contain an array for its value. This allows
|
||||||
* submitting multiple values with the same name, consider:
|
* submitting multiple values with the same name, consider:
|
||||||
*
|
*
|
||||||
* ```php
|
* ```php
|
||||||
|
* <?php
|
||||||
|
* // This will NOT work correctly
|
||||||
* $I->submitForm('#my-form', [
|
* $I->submitForm('#my-form', [
|
||||||
* 'field[]' => 'value',
|
* 'field[]' => 'value',
|
||||||
* 'field[]' => 'another value', // 'field[]' is already a defined key
|
* 'field[]' => 'another value', // 'field[]' is already a defined key
|
||||||
@ -1215,7 +1357,8 @@ trait FunctionalTesterActions
|
|||||||
* The solution is to pass an array value:
|
* The solution is to pass an array value:
|
||||||
*
|
*
|
||||||
* ```php
|
* ```php
|
||||||
* // this way both values are submitted
|
* <?php
|
||||||
|
* // This way both values are submitted
|
||||||
* $I->submitForm('#my-form', [
|
* $I->submitForm('#my-form', [
|
||||||
* 'field' => [
|
* 'field' => [
|
||||||
* 'value',
|
* 'value',
|
||||||
@ -2017,6 +2160,19 @@ trait FunctionalTesterActions
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* [!] 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) {
|
||||||
|
return $this->getScenario()->runStep(new \Codeception\Step\Action('moveBack', func_get_args()));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* [!] Method is generated. Documentation taken from corresponding module.
|
* [!] Method is generated. Documentation taken from corresponding module.
|
||||||
*
|
*
|
||||||
@ -2116,16 +2272,78 @@ trait FunctionalTesterActions
|
|||||||
*
|
*
|
||||||
* ``` php
|
* ``` php
|
||||||
* <?php
|
* <?php
|
||||||
* $I->expectEvents('App\MyEvent');
|
* $I->seeEventTriggered('App\MyEvent');
|
||||||
* $I->expectEvents('App\MyEvent', 'App\MyOtherEvent');
|
* $I->seeEventTriggered(new App\Events\MyEvent());
|
||||||
* $I->expectEvents(['App\MyEvent', 'App\MyOtherEvent']);
|
* $I->seeEventTriggered('App\MyEvent', 'App\MyOtherEvent');
|
||||||
|
* $I->seeEventTriggered(['App\MyEvent', 'App\MyOtherEvent']);
|
||||||
* ?>
|
* ?>
|
||||||
* ```
|
* ```
|
||||||
* @param $events
|
* @param $events
|
||||||
* @see \Codeception\Module\Laravel5::expectEvents()
|
* Conditional Assertion: Test won't be stopped on fail
|
||||||
|
* @see \Codeception\Module\Laravel5::seeEventTriggered()
|
||||||
*/
|
*/
|
||||||
public function expectEvents($events) {
|
public function canSeeEventTriggered($events) {
|
||||||
return $this->getScenario()->runStep(new \Codeception\Step\Action('expectEvents', func_get_args()));
|
return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeEventTriggered', func_get_args()));
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* [!] Method is generated. Documentation taken from corresponding module.
|
||||||
|
*
|
||||||
|
* Make sure events fired during the test.
|
||||||
|
*
|
||||||
|
* ``` php
|
||||||
|
* <?php
|
||||||
|
* $I->seeEventTriggered('App\MyEvent');
|
||||||
|
* $I->seeEventTriggered(new App\Events\MyEvent());
|
||||||
|
* $I->seeEventTriggered('App\MyEvent', 'App\MyOtherEvent');
|
||||||
|
* $I->seeEventTriggered(['App\MyEvent', 'App\MyOtherEvent']);
|
||||||
|
* ?>
|
||||||
|
* ```
|
||||||
|
* @param $events
|
||||||
|
* @see \Codeception\Module\Laravel5::seeEventTriggered()
|
||||||
|
*/
|
||||||
|
public function seeEventTriggered($events) {
|
||||||
|
return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeEventTriggered', func_get_args()));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* [!] Method is generated. Documentation taken from corresponding module.
|
||||||
|
*
|
||||||
|
* Make sure events did not fire during the test.
|
||||||
|
*
|
||||||
|
* ``` php
|
||||||
|
* <?php
|
||||||
|
* $I->dontSeeEventTriggered('App\MyEvent');
|
||||||
|
* $I->dontSeeEventTriggered(new App\Events\MyEvent());
|
||||||
|
* $I->dontSeeEventTriggered('App\MyEvent', 'App\MyOtherEvent');
|
||||||
|
* $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) {
|
||||||
|
return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeEventTriggered', func_get_args()));
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* [!] Method is generated. Documentation taken from corresponding module.
|
||||||
|
*
|
||||||
|
* Make sure events did not fire during the test.
|
||||||
|
*
|
||||||
|
* ``` php
|
||||||
|
* <?php
|
||||||
|
* $I->dontSeeEventTriggered('App\MyEvent');
|
||||||
|
* $I->dontSeeEventTriggered(new App\Events\MyEvent());
|
||||||
|
* $I->dontSeeEventTriggered('App\MyEvent', 'App\MyOtherEvent');
|
||||||
|
* $I->dontSeeEventTriggered(['App\MyEvent', 'App\MyOtherEvent']);
|
||||||
|
* ?>
|
||||||
|
* ```
|
||||||
|
* @param $events
|
||||||
|
* @see \Codeception\Module\Laravel5::dontSeeEventTriggered()
|
||||||
|
*/
|
||||||
|
public function dontSeeEventTriggered($events) {
|
||||||
|
return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeEventTriggered', func_get_args()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -2149,6 +2367,41 @@ trait FunctionalTesterActions
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* [!] Method is generated. Documentation taken from corresponding module.
|
||||||
|
*
|
||||||
|
* Checks that current url matches route
|
||||||
|
*
|
||||||
|
* ``` php
|
||||||
|
* <?php
|
||||||
|
* $I->seeCurrentRouteIs('posts.index');
|
||||||
|
* ?>
|
||||||
|
* ```
|
||||||
|
* @param $routeName
|
||||||
|
* Conditional Assertion: Test won't be stopped on fail
|
||||||
|
* @see \Codeception\Module\Laravel5::seeCurrentRouteIs()
|
||||||
|
*/
|
||||||
|
public function canSeeCurrentRouteIs($routeName) {
|
||||||
|
return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeCurrentRouteIs', func_get_args()));
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* [!] Method is generated. Documentation taken from corresponding module.
|
||||||
|
*
|
||||||
|
* Checks that current url matches route
|
||||||
|
*
|
||||||
|
* ``` php
|
||||||
|
* <?php
|
||||||
|
* $I->seeCurrentRouteIs('posts.index');
|
||||||
|
* ?>
|
||||||
|
* ```
|
||||||
|
* @param $routeName
|
||||||
|
* @see \Codeception\Module\Laravel5::seeCurrentRouteIs()
|
||||||
|
*/
|
||||||
|
public function seeCurrentRouteIs($routeName) {
|
||||||
|
return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeCurrentRouteIs', func_get_args()));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* [!] Method is generated. Documentation taken from corresponding module.
|
* [!] Method is generated. Documentation taken from corresponding module.
|
||||||
*
|
*
|
||||||
@ -2169,43 +2422,6 @@ trait FunctionalTesterActions
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* [!] Method is generated. Documentation taken from corresponding module.
|
|
||||||
*
|
|
||||||
* Checks that current url matches route
|
|
||||||
*
|
|
||||||
* ``` php
|
|
||||||
* <?php
|
|
||||||
* $I->seeCurrentRouteIs('posts.index');
|
|
||||||
* ?>
|
|
||||||
* ```
|
|
||||||
* @param $route
|
|
||||||
* @param array $params
|
|
||||||
* Conditional Assertion: Test won't be stopped on fail
|
|
||||||
* @see \Codeception\Module\Laravel5::seeCurrentRouteIs()
|
|
||||||
*/
|
|
||||||
public function canSeeCurrentRouteIs($route, $params = null) {
|
|
||||||
return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeCurrentRouteIs', func_get_args()));
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* [!] Method is generated. Documentation taken from corresponding module.
|
|
||||||
*
|
|
||||||
* Checks that current url matches route
|
|
||||||
*
|
|
||||||
* ``` php
|
|
||||||
* <?php
|
|
||||||
* $I->seeCurrentRouteIs('posts.index');
|
|
||||||
* ?>
|
|
||||||
* ```
|
|
||||||
* @param $route
|
|
||||||
* @param array $params
|
|
||||||
* @see \Codeception\Module\Laravel5::seeCurrentRouteIs()
|
|
||||||
*/
|
|
||||||
public function seeCurrentRouteIs($route, $params = null) {
|
|
||||||
return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeCurrentRouteIs', func_get_args()));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* [!] Method is generated. Documentation taken from corresponding module.
|
* [!] Method is generated. Documentation taken from corresponding module.
|
||||||
*
|
*
|
||||||
@ -2218,11 +2434,10 @@ trait FunctionalTesterActions
|
|||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
* @param $action
|
* @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()
|
* @see \Codeception\Module\Laravel5::seeCurrentActionIs()
|
||||||
*/
|
*/
|
||||||
public function canSeeCurrentActionIs($action, $params = null) {
|
public function canSeeCurrentActionIs($action) {
|
||||||
return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeCurrentActionIs', func_get_args()));
|
return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeCurrentActionIs', func_get_args()));
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@ -2237,10 +2452,9 @@ trait FunctionalTesterActions
|
|||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
* @param $action
|
* @param $action
|
||||||
* @param array $params
|
|
||||||
* @see \Codeception\Module\Laravel5::seeCurrentActionIs()
|
* @see \Codeception\Module\Laravel5::seeCurrentActionIs()
|
||||||
*/
|
*/
|
||||||
public function seeCurrentActionIs($action, $params = null) {
|
public function seeCurrentActionIs($action) {
|
||||||
return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeCurrentActionIs', func_get_args()));
|
return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeCurrentActionIs', func_get_args()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2408,14 +2622,14 @@ trait FunctionalTesterActions
|
|||||||
*
|
*
|
||||||
* Assert that specific form error messages are set in the view.
|
* Assert that specific form error messages are set in the view.
|
||||||
*
|
*
|
||||||
* Useful for validation messages e.g.
|
* This method calls `seeFormErrorMessage` for each entry in the `$bindings` array.
|
||||||
* return `Redirect::to('register')->withErrors($validator);`
|
|
||||||
*
|
|
||||||
* Example of Usage
|
|
||||||
*
|
*
|
||||||
* ``` php
|
* ``` php
|
||||||
* <?php
|
* <?php
|
||||||
* $I->seeFormErrorMessages(array('username'=>'Invalid Username'));
|
* $I->seeFormErrorMessages([
|
||||||
|
* 'username' => 'Invalid Username',
|
||||||
|
* 'password' => null,
|
||||||
|
* ]);
|
||||||
* ?>
|
* ?>
|
||||||
* ```
|
* ```
|
||||||
* @param array $bindings
|
* @param array $bindings
|
||||||
@ -2430,14 +2644,14 @@ trait FunctionalTesterActions
|
|||||||
*
|
*
|
||||||
* Assert that specific form error messages are set in the view.
|
* Assert that specific form error messages are set in the view.
|
||||||
*
|
*
|
||||||
* Useful for validation messages e.g.
|
* This method calls `seeFormErrorMessage` for each entry in the `$bindings` array.
|
||||||
* return `Redirect::to('register')->withErrors($validator);`
|
|
||||||
*
|
|
||||||
* Example of Usage
|
|
||||||
*
|
*
|
||||||
* ``` php
|
* ``` php
|
||||||
* <?php
|
* <?php
|
||||||
* $I->seeFormErrorMessages(array('username'=>'Invalid Username'));
|
* $I->seeFormErrorMessages([
|
||||||
|
* 'username' => 'Invalid Username',
|
||||||
|
* 'password' => null,
|
||||||
|
* ]);
|
||||||
* ?>
|
* ?>
|
||||||
* ```
|
* ```
|
||||||
* @param array $bindings
|
* @param array $bindings
|
||||||
@ -2451,48 +2665,50 @@ trait FunctionalTesterActions
|
|||||||
/**
|
/**
|
||||||
* [!] Method is generated. Documentation taken from corresponding module.
|
* [!] Method is generated. Documentation taken from corresponding module.
|
||||||
*
|
*
|
||||||
* Assert that specific form error message is set in the view.
|
* Assert that a specific form error message is set in the view.
|
||||||
*
|
*
|
||||||
* Useful for validation messages and generally messages array
|
* If you want to assert that there is a form error message for a specific key
|
||||||
* e.g.
|
* but don't care about the actual error message you can omit `$expectedErrorMessage`.
|
||||||
* return `Redirect::to('register')->withErrors($validator);`
|
|
||||||
*
|
*
|
||||||
* Example of Usage
|
* If you do pass `$expectedErrorMessage`, this method checks if the actual error message for a key
|
||||||
|
* contains `$expectedErrorMessage`.
|
||||||
*
|
*
|
||||||
* ``` php
|
* ``` php
|
||||||
* <?php
|
* <?php
|
||||||
|
* $I->seeFormErrorMessage('username');
|
||||||
* $I->seeFormErrorMessage('username', 'Invalid Username');
|
* $I->seeFormErrorMessage('username', 'Invalid Username');
|
||||||
* ?>
|
* ?>
|
||||||
* ```
|
* ```
|
||||||
* @param string $key
|
* @param string $key
|
||||||
* @param string $errorMessage
|
* @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()
|
* @see \Codeception\Module\Laravel5::seeFormErrorMessage()
|
||||||
*/
|
*/
|
||||||
public function canSeeFormErrorMessage($key, $errorMessage) {
|
public function canSeeFormErrorMessage($key, $expectedErrorMessage = null) {
|
||||||
return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeFormErrorMessage', func_get_args()));
|
return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeFormErrorMessage', func_get_args()));
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* [!] Method is generated. Documentation taken from corresponding module.
|
* [!] Method is generated. Documentation taken from corresponding module.
|
||||||
*
|
*
|
||||||
* Assert that specific form error message is set in the view.
|
* Assert that a specific form error message is set in the view.
|
||||||
*
|
*
|
||||||
* Useful for validation messages and generally messages array
|
* If you want to assert that there is a form error message for a specific key
|
||||||
* e.g.
|
* but don't care about the actual error message you can omit `$expectedErrorMessage`.
|
||||||
* return `Redirect::to('register')->withErrors($validator);`
|
|
||||||
*
|
*
|
||||||
* Example of Usage
|
* If you do pass `$expectedErrorMessage`, this method checks if the actual error message for a key
|
||||||
|
* contains `$expectedErrorMessage`.
|
||||||
*
|
*
|
||||||
* ``` php
|
* ``` php
|
||||||
* <?php
|
* <?php
|
||||||
|
* $I->seeFormErrorMessage('username');
|
||||||
* $I->seeFormErrorMessage('username', 'Invalid Username');
|
* $I->seeFormErrorMessage('username', 'Invalid Username');
|
||||||
* ?>
|
* ?>
|
||||||
* ```
|
* ```
|
||||||
* @param string $key
|
* @param string $key
|
||||||
* @param string $errorMessage
|
* @param string|null $expectedErrorMessage
|
||||||
* @see \Codeception\Module\Laravel5::seeFormErrorMessage()
|
* @see \Codeception\Module\Laravel5::seeFormErrorMessage()
|
||||||
*/
|
*/
|
||||||
public function seeFormErrorMessage($key, $errorMessage) {
|
public function seeFormErrorMessage($key, $expectedErrorMessage = null) {
|
||||||
return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeFormErrorMessage', func_get_args()));
|
return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeFormErrorMessage', func_get_args()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2504,8 +2720,6 @@ trait FunctionalTesterActions
|
|||||||
* Takes either an object that implements the User interface or
|
* Takes either an object that implements the User interface or
|
||||||
* an array of credentials.
|
* an array of credentials.
|
||||||
*
|
*
|
||||||
* Example of Usage
|
|
||||||
*
|
|
||||||
* ``` php
|
* ``` php
|
||||||
* <?php
|
* <?php
|
||||||
* // provide array of credentials
|
* // provide array of credentials
|
||||||
@ -2530,7 +2744,7 @@ trait FunctionalTesterActions
|
|||||||
/**
|
/**
|
||||||
* [!] Method is generated. Documentation taken from corresponding module.
|
* [!] Method is generated. Documentation taken from corresponding module.
|
||||||
*
|
*
|
||||||
* Logs user out
|
* Logout user.
|
||||||
* @see \Codeception\Module\Laravel5::logout()
|
* @see \Codeception\Module\Laravel5::logout()
|
||||||
*/
|
*/
|
||||||
public function logout() {
|
public function logout() {
|
||||||
@ -2541,7 +2755,7 @@ trait FunctionalTesterActions
|
|||||||
/**
|
/**
|
||||||
* [!] Method is generated. Documentation taken from corresponding module.
|
* [!] Method is generated. Documentation taken from corresponding module.
|
||||||
*
|
*
|
||||||
* Checks that user is authenticated
|
* Checks that a user is authenticated
|
||||||
* Conditional Assertion: Test won't be stopped on fail
|
* Conditional Assertion: Test won't be stopped on fail
|
||||||
* @see \Codeception\Module\Laravel5::seeAuthentication()
|
* @see \Codeception\Module\Laravel5::seeAuthentication()
|
||||||
*/
|
*/
|
||||||
@ -2551,7 +2765,7 @@ trait FunctionalTesterActions
|
|||||||
/**
|
/**
|
||||||
* [!] Method is generated. Documentation taken from corresponding module.
|
* [!] Method is generated. Documentation taken from corresponding module.
|
||||||
*
|
*
|
||||||
* Checks that user is authenticated
|
* Checks that a user is authenticated
|
||||||
* @see \Codeception\Module\Laravel5::seeAuthentication()
|
* @see \Codeception\Module\Laravel5::seeAuthentication()
|
||||||
*/
|
*/
|
||||||
public function seeAuthentication() {
|
public function seeAuthentication() {
|
||||||
@ -2586,7 +2800,6 @@ trait FunctionalTesterActions
|
|||||||
* Return an instance of a class from the IoC Container.
|
* Return an instance of a class from the IoC Container.
|
||||||
* (http://laravel.com/docs/ioc)
|
* (http://laravel.com/docs/ioc)
|
||||||
*
|
*
|
||||||
* Example
|
|
||||||
* ``` php
|
* ``` php
|
||||||
* <?php
|
* <?php
|
||||||
* // In Laravel
|
* // In Laravel
|
||||||
@ -2735,4 +2948,88 @@ trait FunctionalTesterActions
|
|||||||
public function grabRecord($tableName, $attributes = null) {
|
public function grabRecord($tableName, $attributes = null) {
|
||||||
return $this->getScenario()->runStep(new \Codeception\Step\Action('grabRecord', func_get_args()));
|
return $this->getScenario()->runStep(new \Codeception\Step\Action('grabRecord', func_get_args()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* [!] Method is generated. Documentation taken from corresponding module.
|
||||||
|
*
|
||||||
|
* Use Laravel's model factory to create a model.
|
||||||
|
* Can only be used with Laravel 5.1 and later.
|
||||||
|
*
|
||||||
|
* ``` php
|
||||||
|
* <?php
|
||||||
|
* $I->haveModel('App\User');
|
||||||
|
* $I->haveModel('App\User', ['name' => 'John Doe']);
|
||||||
|
* $I->haveModel('App\User', [], 'admin');
|
||||||
|
* $I->haveModel('App\User', [], 'admin', 3);
|
||||||
|
* ?>
|
||||||
|
* ```
|
||||||
|
*
|
||||||
|
* @see http://laravel.com/docs/5.1/testing#model-factories
|
||||||
|
* @param string $model
|
||||||
|
* @param array $attributes
|
||||||
|
* @param string $name
|
||||||
|
* @param int $times
|
||||||
|
* @return mixed
|
||||||
|
* @see \Codeception\Module\Laravel5::haveModel()
|
||||||
|
*/
|
||||||
|
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.
|
||||||
|
*
|
||||||
|
* Use Laravel's model factory to create a model.
|
||||||
|
* Can only be used with Laravel 5.1 and later.
|
||||||
|
*
|
||||||
|
* ``` php
|
||||||
|
* <?php
|
||||||
|
* $I->createModel('App\User');
|
||||||
|
* $I->createModel('App\User', ['name' => 'John Doe']);
|
||||||
|
* $I->createModel('App\User', [], 'admin');
|
||||||
|
* $I->createModel('App\User', [], 'admin', 3);
|
||||||
|
* ?>
|
||||||
|
* ```
|
||||||
|
*
|
||||||
|
* @see http://laravel.com/docs/5.1/testing#model-factories
|
||||||
|
* @param string $model
|
||||||
|
* @param array $attributes
|
||||||
|
* @param string $name
|
||||||
|
* @param int $times
|
||||||
|
* @return mixed
|
||||||
|
* @see \Codeception\Module\Laravel5::createModel()
|
||||||
|
*/
|
||||||
|
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.
|
||||||
|
*
|
||||||
|
* Use Laravel's model factory to make a model.
|
||||||
|
* Can only be used with Laravel 5.1 and later.
|
||||||
|
*
|
||||||
|
* ``` php
|
||||||
|
* <?php
|
||||||
|
* $I->makeModel('App\User');
|
||||||
|
* $I->makeModel('App\User', ['name' => 'John Doe']);
|
||||||
|
* $I->makeModel('App\User', [], 'admin');
|
||||||
|
* $I->makeModel('App\User', [], 'admin', 3);
|
||||||
|
* ?>
|
||||||
|
* ```
|
||||||
|
*
|
||||||
|
* @see http://laravel.com/docs/5.1/testing#model-factories
|
||||||
|
* @param string $model
|
||||||
|
* @param array $attributes
|
||||||
|
* @param string $name
|
||||||
|
* @param int $times
|
||||||
|
* @return mixed
|
||||||
|
* @see \Codeception\Module\Laravel5::makeModel()
|
||||||
|
*/
|
||||||
|
public function makeModel($model, $attributes = null, $name = null, $times = null) {
|
||||||
|
return $this->getScenario()->runStep(new \Codeception\Step\Action('makeModel', func_get_args()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user