for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* @license LGPLv3, http://opensource.org/licenses/LGPL-3.0
* @copyright Aimeos (aimeos.org), 2018
*/
namespace Aimeos\MW\Setup\Task;
* Adds customer property test data.
class CustomerPropertyAddLaravelTestData
extends \Aimeos\MW\Setup\Task\CustomerAddPropertyTestData
{
* Returns the list of task names which this task depends on.
*
* @return string[] List of task names
public function getPreDependencies()
return array( 'TablesCreateLaravel', 'CustomerAddLaravelTestData', 'LocaleAddTestData' );
}
* Adds customer test data.
public function migrate()
$iface = '\\Aimeos\\MShop\\Context\\Item\\Iface';
if( !( $this->additional instanceof $iface ) ) {
throw new \Aimeos\MW\Setup\Exception( sprintf( 'Additionally provided object is not of type "%1$s"', $iface ) );
$this->msg( 'Adding customer-property Laravel test data', 0 );
$this->additional->setEditor( 'ai-laravel:unittest' );
$ds = DIRECTORY_SEPARATOR;
$path = __DIR__ . $ds . 'data' . $ds . 'customer-property.php';
if( ( $testdata = include( $path ) ) == false ) {
throw new \Aimeos\MShop\Exception( sprintf( 'No file "%1$s" found for customer domain', $path ) );
$this->addCustomerPropertyData( $testdata, 'Laravel' );
$this->status( 'done' );