@@ -17,144 +17,144 @@ |
||
| 17 | 17 | |
| 18 | 18 | public function testGetId() |
| 19 | 19 | { |
| 20 | - $this->assertEquals( null, $this->object->getId() ); |
|
| 20 | + $this->assertEquals(null, $this->object->getId()); |
|
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | |
| 24 | 24 | public function testGetSetCompany() |
| 25 | 25 | { |
| 26 | - $this->object->setCompany( 'ABC' ); |
|
| 27 | - $this->assertEquals( 'ABC', $this->object->getCompany() ); |
|
| 26 | + $this->object->setCompany('ABC'); |
|
| 27 | + $this->assertEquals('ABC', $this->object->getCompany()); |
|
| 28 | 28 | } |
| 29 | 29 | |
| 30 | 30 | |
| 31 | 31 | public function testGetSetVatID() |
| 32 | 32 | { |
| 33 | - $this->object->setVatID( 'AT0000' ); |
|
| 34 | - $this->assertEquals( 'AT0000', $this->object->getVatID() ); |
|
| 33 | + $this->object->setVatID('AT0000'); |
|
| 34 | + $this->assertEquals('AT0000', $this->object->getVatID()); |
|
| 35 | 35 | } |
| 36 | 36 | |
| 37 | 37 | |
| 38 | 38 | public function testGetSetSalutation() |
| 39 | 39 | { |
| 40 | - $this->object->setSalutation( \Aimeos\MShop\Common\Item\Address\Base::SALUTATION_UNKNOWN ); |
|
| 41 | - $this->assertEquals( \Aimeos\MShop\Common\Item\Address\Base::SALUTATION_UNKNOWN, $this->object->getSalutation() ); |
|
| 40 | + $this->object->setSalutation(\Aimeos\MShop\Common\Item\Address\Base::SALUTATION_UNKNOWN); |
|
| 41 | + $this->assertEquals(\Aimeos\MShop\Common\Item\Address\Base::SALUTATION_UNKNOWN, $this->object->getSalutation()); |
|
| 42 | 42 | |
| 43 | - $this->object->setSalutation( \Aimeos\MShop\Common\Item\Address\Base::SALUTATION_COMPANY ); |
|
| 44 | - $this->assertEquals( \Aimeos\MShop\Common\Item\Address\Base::SALUTATION_COMPANY, $this->object->getSalutation() ); |
|
| 43 | + $this->object->setSalutation(\Aimeos\MShop\Common\Item\Address\Base::SALUTATION_COMPANY); |
|
| 44 | + $this->assertEquals(\Aimeos\MShop\Common\Item\Address\Base::SALUTATION_COMPANY, $this->object->getSalutation()); |
|
| 45 | 45 | |
| 46 | - $this->object->setSalutation( \Aimeos\MShop\Common\Item\Address\Base::SALUTATION_MRS ); |
|
| 47 | - $this->assertEquals( \Aimeos\MShop\Common\Item\Address\Base::SALUTATION_MRS, $this->object->getSalutation() ); |
|
| 46 | + $this->object->setSalutation(\Aimeos\MShop\Common\Item\Address\Base::SALUTATION_MRS); |
|
| 47 | + $this->assertEquals(\Aimeos\MShop\Common\Item\Address\Base::SALUTATION_MRS, $this->object->getSalutation()); |
|
| 48 | 48 | |
| 49 | - $this->object->setSalutation( \Aimeos\MShop\Common\Item\Address\Base::SALUTATION_MISS ); |
|
| 50 | - $this->assertEquals( \Aimeos\MShop\Common\Item\Address\Base::SALUTATION_MISS, $this->object->getSalutation() ); |
|
| 49 | + $this->object->setSalutation(\Aimeos\MShop\Common\Item\Address\Base::SALUTATION_MISS); |
|
| 50 | + $this->assertEquals(\Aimeos\MShop\Common\Item\Address\Base::SALUTATION_MISS, $this->object->getSalutation()); |
|
| 51 | 51 | |
| 52 | - $this->object->setSalutation( \Aimeos\MShop\Common\Item\Address\Base::SALUTATION_MR ); |
|
| 53 | - $this->assertEquals( \Aimeos\MShop\Common\Item\Address\Base::SALUTATION_MR, $this->object->getSalutation() ); |
|
| 52 | + $this->object->setSalutation(\Aimeos\MShop\Common\Item\Address\Base::SALUTATION_MR); |
|
| 53 | + $this->assertEquals(\Aimeos\MShop\Common\Item\Address\Base::SALUTATION_MR, $this->object->getSalutation()); |
|
| 54 | 54 | } |
| 55 | 55 | |
| 56 | 56 | |
| 57 | 57 | public function testGetSetTitle() |
| 58 | 58 | { |
| 59 | - $this->object->setTitle( 'Prof. Dr.' ); |
|
| 60 | - $this->assertEquals( 'Prof. Dr.', $this->object->getTitle() ); |
|
| 59 | + $this->object->setTitle('Prof. Dr.'); |
|
| 60 | + $this->assertEquals('Prof. Dr.', $this->object->getTitle()); |
|
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | |
| 64 | 64 | public function testGetSetFirstname() |
| 65 | 65 | { |
| 66 | - $this->object->setFirstname( 'first' ); |
|
| 67 | - $this->assertEquals( 'first', $this->object->getFirstname() ); |
|
| 66 | + $this->object->setFirstname('first'); |
|
| 67 | + $this->assertEquals('first', $this->object->getFirstname()); |
|
| 68 | 68 | } |
| 69 | 69 | |
| 70 | 70 | |
| 71 | 71 | public function testGetSetLastname() |
| 72 | 72 | { |
| 73 | - $this->object->setLastname( 'last' ); |
|
| 74 | - $this->assertEquals( 'last', $this->object->getLastname() ); |
|
| 73 | + $this->object->setLastname('last'); |
|
| 74 | + $this->assertEquals('last', $this->object->getLastname()); |
|
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | |
| 78 | 78 | public function testGetSetAddress1() |
| 79 | 79 | { |
| 80 | - $this->object->setAddress1( 'test street' ); |
|
| 81 | - $this->assertEquals( 'test street', $this->object->getAddress1() ); |
|
| 80 | + $this->object->setAddress1('test street'); |
|
| 81 | + $this->assertEquals('test street', $this->object->getAddress1()); |
|
| 82 | 82 | } |
| 83 | 83 | |
| 84 | 84 | |
| 85 | 85 | public function testGetSetAddress2() |
| 86 | 86 | { |
| 87 | - $this->object->setAddress2( '1' ); |
|
| 88 | - $this->assertEquals( '1', $this->object->getAddress2() ); |
|
| 87 | + $this->object->setAddress2('1'); |
|
| 88 | + $this->assertEquals('1', $this->object->getAddress2()); |
|
| 89 | 89 | } |
| 90 | 90 | |
| 91 | 91 | |
| 92 | 92 | public function testGetSetAddress3() |
| 93 | 93 | { |
| 94 | - $this->object->setAddress3( 'EG' ); |
|
| 95 | - $this->assertEquals( 'EG', $this->object->getAddress3() ); |
|
| 94 | + $this->object->setAddress3('EG'); |
|
| 95 | + $this->assertEquals('EG', $this->object->getAddress3()); |
|
| 96 | 96 | } |
| 97 | 97 | |
| 98 | 98 | |
| 99 | 99 | public function testGetSetPostal() |
| 100 | 100 | { |
| 101 | - $this->object->setPostal( '12345' ); |
|
| 102 | - $this->assertEquals( '12345', $this->object->getPostal() ); |
|
| 101 | + $this->object->setPostal('12345'); |
|
| 102 | + $this->assertEquals('12345', $this->object->getPostal()); |
|
| 103 | 103 | } |
| 104 | 104 | |
| 105 | 105 | |
| 106 | 106 | public function testGetSetCity() |
| 107 | 107 | { |
| 108 | - $this->object->setCity( 'Munich' ); |
|
| 109 | - $this->assertEquals( 'Munich', $this->object->getCity() ); |
|
| 108 | + $this->object->setCity('Munich'); |
|
| 109 | + $this->assertEquals('Munich', $this->object->getCity()); |
|
| 110 | 110 | } |
| 111 | 111 | |
| 112 | 112 | |
| 113 | 113 | public function testGetSetState() |
| 114 | 114 | { |
| 115 | - $this->object->setState( 'Bayern' ); |
|
| 116 | - $this->assertEquals( 'Bayern', $this->object->getState() ); |
|
| 115 | + $this->object->setState('Bayern'); |
|
| 116 | + $this->assertEquals('Bayern', $this->object->getState()); |
|
| 117 | 117 | } |
| 118 | 118 | |
| 119 | 119 | |
| 120 | 120 | public function testGetSetCountryId() |
| 121 | 121 | { |
| 122 | - $this->object->setCountryId( 'DE' ); |
|
| 123 | - $this->assertEquals( 'DE', $this->object->getCountryId() ); |
|
| 122 | + $this->object->setCountryId('DE'); |
|
| 123 | + $this->assertEquals('DE', $this->object->getCountryId()); |
|
| 124 | 124 | } |
| 125 | 125 | |
| 126 | 126 | |
| 127 | 127 | public function testGetSetLanguageId() |
| 128 | 128 | { |
| 129 | - $this->object->setLanguageId( 'de' ); |
|
| 130 | - $this->assertEquals( 'de', $this->object->getLanguageId() ); |
|
| 129 | + $this->object->setLanguageId('de'); |
|
| 130 | + $this->assertEquals('de', $this->object->getLanguageId()); |
|
| 131 | 131 | } |
| 132 | 132 | |
| 133 | 133 | |
| 134 | 134 | public function testGetSetTelephone() |
| 135 | 135 | { |
| 136 | - $this->object->setTelephone( '089123456789' ); |
|
| 137 | - $this->assertEquals( '089123456789', $this->object->getTelephone() ); |
|
| 136 | + $this->object->setTelephone('089123456789'); |
|
| 137 | + $this->assertEquals('089123456789', $this->object->getTelephone()); |
|
| 138 | 138 | } |
| 139 | 139 | |
| 140 | 140 | |
| 141 | 141 | public function testGetSetTelefax() |
| 142 | 142 | { |
| 143 | - $this->object->setTelefax( '089987654321' ); |
|
| 144 | - $this->assertEquals( '089987654321', $this->object->getTelefax() ); |
|
| 143 | + $this->object->setTelefax('089987654321'); |
|
| 144 | + $this->assertEquals('089987654321', $this->object->getTelefax()); |
|
| 145 | 145 | } |
| 146 | 146 | |
| 147 | 147 | |
| 148 | 148 | public function testGetSetWebsite() |
| 149 | 149 | { |
| 150 | - $this->object->setWebsite( 'http://aimeos.org' ); |
|
| 151 | - $this->assertEquals( 'http://aimeos.org', $this->object->getWebsite() ); |
|
| 150 | + $this->object->setWebsite('http://aimeos.org'); |
|
| 151 | + $this->assertEquals('http://aimeos.org', $this->object->getWebsite()); |
|
| 152 | 152 | } |
| 153 | 153 | |
| 154 | 154 | |
| 155 | 155 | public function testSetWebsiteInvalid() |
| 156 | 156 | { |
| 157 | - $this->setExpectedException( 'Exception' ); |
|
| 158 | - $this->object->setWebsite( 'aimeos+org' ); |
|
| 157 | + $this->setExpectedException('Exception'); |
|
| 158 | + $this->object->setWebsite('aimeos+org'); |
|
| 159 | 159 | } |
| 160 | 160 | } |
@@ -10,17 +10,17 @@ |
||
| 10 | 10 | public function testTerms() |
| 11 | 11 | { |
| 12 | 12 | $client = static::createClient(); |
| 13 | - $crawler = $client->request( 'GET', '/unittest/de/EUR/terms' ); |
|
| 13 | + $crawler = $client->request('GET', '/unittest/de/EUR/terms'); |
|
| 14 | 14 | |
| 15 | - $this->assertEquals( 1, $crawler->filter( 'body:contains("Terms")' )->count() ); |
|
| 15 | + $this->assertEquals(1, $crawler->filter('body:contains("Terms")')->count()); |
|
| 16 | 16 | } |
| 17 | 17 | |
| 18 | 18 | |
| 19 | 19 | public function testPrivacy() |
| 20 | 20 | { |
| 21 | 21 | $client = static::createClient(); |
| 22 | - $crawler = $client->request( 'GET', '/unittest/de/EUR/privacy' ); |
|
| 22 | + $crawler = $client->request('GET', '/unittest/de/EUR/privacy'); |
|
| 23 | 23 | |
| 24 | - $this->assertEquals( 1, $crawler->filter( 'body:contains("Privacy")' )->count() ); |
|
| 24 | + $this->assertEquals(1, $crawler->filter('body:contains("Privacy")')->count()); |
|
| 25 | 25 | } |
| 26 | 26 | } |
@@ -14,13 +14,13 @@ |
||
| 14 | 14 | $kernel = $this->createKernel(); |
| 15 | 15 | $kernel->boot(); |
| 16 | 16 | |
| 17 | - $application = new Application( $kernel ); |
|
| 18 | - $application->add( new Command\SetupCommand() ); |
|
| 17 | + $application = new Application($kernel); |
|
| 18 | + $application->add(new Command\SetupCommand()); |
|
| 19 | 19 | |
| 20 | - $command = $application->find( 'aimeos:setup' ); |
|
| 21 | - $commandTester = new CommandTester( $command ); |
|
| 22 | - $commandTester->execute( array( 'command' => $command->getName(), 'site' => 'unittest', 'tplsite' => 'unittest', '--option' => 'setup/default/demo:0' ) ); |
|
| 20 | + $command = $application->find('aimeos:setup'); |
|
| 21 | + $commandTester = new CommandTester($command); |
|
| 22 | + $commandTester->execute(array('command' => $command->getName(), 'site' => 'unittest', 'tplsite' => 'unittest', '--option' => 'setup/default/demo:0')); |
|
| 23 | 23 | |
| 24 | - $this->assertEquals( 0, $commandTester->getStatusCode() ); |
|
| 24 | + $this->assertEquals(0, $commandTester->getStatusCode()); |
|
| 25 | 25 | } |
| 26 | 26 | } |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | */ |
| 29 | 29 | public function privacyAction() |
| 30 | 30 | { |
| 31 | - return $this->render( 'AimeosShopBundle:Page:privacy.html.twig' ); |
|
| 31 | + return $this->render('AimeosShopBundle:Page:privacy.html.twig'); |
|
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | |
@@ -39,6 +39,6 @@ discard block |
||
| 39 | 39 | */ |
| 40 | 40 | public function termsAction() |
| 41 | 41 | { |
| 42 | - return $this->render( 'AimeosShopBundle:Page:terms.html.twig' ); |
|
| 42 | + return $this->render('AimeosShopBundle:Page:terms.html.twig'); |
|
| 43 | 43 | } |
| 44 | 44 | } |
@@ -25,15 +25,15 @@ |
||
| 25 | 25 | * @param InputInterface $input Input object |
| 26 | 26 | * @return \Aimeos\MShop\Locale\Item\Site\Interface[] List of site items |
| 27 | 27 | */ |
| 28 | - protected function getSiteItems( \Aimeos\MShop\Context\Item\Iface $context, InputInterface $input ) |
|
| 28 | + protected function getSiteItems(\Aimeos\MShop\Context\Item\Iface $context, InputInterface $input) |
|
| 29 | 29 | { |
| 30 | - $manager = \Aimeos\MShop\Locale\Manager\Factory::createManager( $context )->getSubManager( 'site' ); |
|
| 30 | + $manager = \Aimeos\MShop\Locale\Manager\Factory::createManager($context)->getSubManager('site'); |
|
| 31 | 31 | $search = $manager->createSearch(); |
| 32 | 32 | |
| 33 | - if( ( $codes = (string) $input->getArgument( 'site' ) ) !== '' ) { |
|
| 34 | - $search->setConditions( $search->compare( '==', 'locale.site.code', explode( ' ', $codes ) ) ); |
|
| 33 | + if (($codes = (string) $input->getArgument('site')) !== '') { |
|
| 34 | + $search->setConditions($search->compare('==', 'locale.site.code', explode(' ', $codes))); |
|
| 35 | 35 | } |
| 36 | 36 | |
| 37 | - return $manager->searchItems( $search ); |
|
| 37 | + return $manager->searchItems($search); |
|
| 38 | 38 | } |
| 39 | 39 | } |
@@ -23,9 +23,9 @@ discard block |
||
| 23 | 23 | */ |
| 24 | 24 | protected function configure() |
| 25 | 25 | { |
| 26 | - $this->setName( 'aimeos:cache' ); |
|
| 27 | - $this->setDescription( 'Clears the content cache' ); |
|
| 28 | - $this->addArgument( 'site', InputArgument::OPTIONAL, 'Site codes to clear the cache like "default unittest" (none for all)' ); |
|
| 26 | + $this->setName('aimeos:cache'); |
|
| 27 | + $this->setDescription('Clears the content cache'); |
|
| 28 | + $this->addArgument('site', InputArgument::OPTIONAL, 'Site codes to clear the cache like "default unittest" (none for all)'); |
|
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | |
@@ -35,26 +35,26 @@ discard block |
||
| 35 | 35 | * @param InputInterface $input Input object |
| 36 | 36 | * @param OutputInterface $output Output object |
| 37 | 37 | */ |
| 38 | - protected function execute( InputInterface $input, OutputInterface $output ) |
|
| 38 | + protected function execute(InputInterface $input, OutputInterface $output) |
|
| 39 | 39 | { |
| 40 | - $context = $this->getContainer()->get( 'aimeos_context' )->get( false ); |
|
| 41 | - $context->setEditor( 'aimeos:cache' ); |
|
| 40 | + $context = $this->getContainer()->get('aimeos_context')->get(false); |
|
| 41 | + $context->setEditor('aimeos:cache'); |
|
| 42 | 42 | |
| 43 | - $localeManager = \Aimeos\MShop\Locale\Manager\Factory::createManager( $context ); |
|
| 43 | + $localeManager = \Aimeos\MShop\Locale\Manager\Factory::createManager($context); |
|
| 44 | 44 | |
| 45 | - foreach( $this->getSiteItems( $context, $input ) as $siteItem ) |
|
| 45 | + foreach ($this->getSiteItems($context, $input) as $siteItem) |
|
| 46 | 46 | { |
| 47 | - $localeItem = $localeManager->bootstrap( $siteItem->getCode(), '', '', false ); |
|
| 47 | + $localeItem = $localeManager->bootstrap($siteItem->getCode(), '', '', false); |
|
| 48 | 48 | |
| 49 | 49 | $lcontext = clone $context; |
| 50 | - $lcontext->setLocale( $localeItem ); |
|
| 50 | + $lcontext->setLocale($localeItem); |
|
| 51 | 51 | |
| 52 | - $cache = new \Aimeos\MAdmin\Cache\Proxy\Standard( $lcontext ); |
|
| 53 | - $lcontext->setCache( $cache ); |
|
| 52 | + $cache = new \Aimeos\MAdmin\Cache\Proxy\Standard($lcontext); |
|
| 53 | + $lcontext->setCache($cache); |
|
| 54 | 54 | |
| 55 | - $output->writeln( sprintf( 'Clearing the Aimeos cache for site <info>%1$s</info>', $siteItem->getCode() ) ); |
|
| 55 | + $output->writeln(sprintf('Clearing the Aimeos cache for site <info>%1$s</info>', $siteItem->getCode())); |
|
| 56 | 56 | |
| 57 | - \Aimeos\MAdmin\Cache\Manager\Factory::createManager( $lcontext )->getCache()->flush(); |
|
| 57 | + \Aimeos\MAdmin\Cache\Manager\Factory::createManager($lcontext)->getCache()->flush(); |
|
| 58 | 58 | } |
| 59 | 59 | } |
| 60 | 60 | } |
@@ -14,13 +14,13 @@ |
||
| 14 | 14 | $kernel = $this->createKernel(); |
| 15 | 15 | $kernel->boot(); |
| 16 | 16 | |
| 17 | - $application = new Application( $kernel ); |
|
| 18 | - $application->add( new Command\JobsCommand() ); |
|
| 17 | + $application = new Application($kernel); |
|
| 18 | + $application->add(new Command\JobsCommand()); |
|
| 19 | 19 | |
| 20 | - $command = $application->find( 'aimeos:jobs' ); |
|
| 21 | - $commandTester = new CommandTester( $command ); |
|
| 22 | - $commandTester->execute( array( 'command' => $command->getName(), 'site' => 'unittest', 'jobs' => 'index/rebuild' ) ); |
|
| 20 | + $command = $application->find('aimeos:jobs'); |
|
| 21 | + $commandTester = new CommandTester($command); |
|
| 22 | + $commandTester->execute(array('command' => $command->getName(), 'site' => 'unittest', 'jobs' => 'index/rebuild')); |
|
| 23 | 23 | |
| 24 | - $this->assertEquals( 0, $commandTester->getStatusCode() ); |
|
| 24 | + $this->assertEquals(0, $commandTester->getStatusCode()); |
|
| 25 | 25 | } |
| 26 | 26 | } |
@@ -14,13 +14,13 @@ |
||
| 14 | 14 | $kernel = $this->createKernel(); |
| 15 | 15 | $kernel->boot(); |
| 16 | 16 | |
| 17 | - $application = new Application( $kernel ); |
|
| 18 | - $application->add( new Command\CacheCommand() ); |
|
| 17 | + $application = new Application($kernel); |
|
| 18 | + $application->add(new Command\CacheCommand()); |
|
| 19 | 19 | |
| 20 | - $command = $application->find( 'aimeos:cache' ); |
|
| 21 | - $commandTester = new CommandTester( $command ); |
|
| 22 | - $commandTester->execute( array( 'command' => $command->getName(), 'site' => 'unittest' ) ); |
|
| 20 | + $command = $application->find('aimeos:cache'); |
|
| 21 | + $commandTester = new CommandTester($command); |
|
| 22 | + $commandTester->execute(array('command' => $command->getName(), 'site' => 'unittest')); |
|
| 23 | 23 | |
| 24 | - $this->assertEquals( 0, $commandTester->getStatusCode() ); |
|
| 24 | + $this->assertEquals(0, $commandTester->getStatusCode()); |
|
| 25 | 25 | } |
| 26 | 26 | } |
@@ -209,7 +209,7 @@ discard block |
||
| 209 | 209 | */ |
| 210 | 210 | public function getRoles() |
| 211 | 211 | { |
| 212 | - return array( 'ROLE_USER' ); |
|
| 212 | + return array('ROLE_USER'); |
|
| 213 | 213 | } |
| 214 | 214 | |
| 215 | 215 | |
@@ -226,23 +226,23 @@ discard block |
||
| 226 | 226 | */ |
| 227 | 227 | public function serialize() |
| 228 | 228 | { |
| 229 | - return serialize( array( |
|
| 229 | + return serialize(array( |
|
| 230 | 230 | $this->id, |
| 231 | 231 | $this->username, |
| 232 | 232 | $this->password, |
| 233 | - ) ); |
|
| 233 | + )); |
|
| 234 | 234 | } |
| 235 | 235 | |
| 236 | 236 | |
| 237 | 237 | /** |
| 238 | 238 | * @see \Serializable::unserialize() |
| 239 | 239 | */ |
| 240 | - public function unserialize( $serialized ) |
|
| 240 | + public function unserialize($serialized) |
|
| 241 | 241 | { |
| 242 | 242 | list ( |
| 243 | 243 | $this->id, |
| 244 | 244 | $this->username, |
| 245 | 245 | $this->password, |
| 246 | - ) = unserialize( $serialized ); |
|
| 246 | + ) = unserialize($serialized); |
|
| 247 | 247 | } |
| 248 | 248 | } |