Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/nbproject

/.php_cs.cache
/phpunit-skeleton-generator.sh
/composer.phar
/composer.lock
/vendor/
/Resources/doc/_build
/bin/phpunit
*~
*~
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
"stof/doctrine-extensions-bundle": ">=1.2",
"jeroendesloovere/vcard-bundle": ">=1.2",
"sparkling/vat-bundle": ">=0.1",
"blast-project/core-bundle": ">=0.4",
"blast-project/outer-extension-bundle": ">=0.4",
"blast-project/base-entities-bundle": ">=0.4",
"blast-project/utils-bundle": ">=0.4"
"blast-project/core-bundle": "dev-wip-lisem",
"blast-project/outer-extension-bundle": "dev-wip-lisem",
"blast-project/base-entities-bundle": "dev-wip-lisem",
"blast-project/utils-bundle": "dev-wip-lisem"
},
"require-dev": {
"symfony/phpunit-bridge": ">=3.2"
Expand Down
1 change: 0 additions & 1 deletion tests/Functional/.gitkeep

This file was deleted.

26 changes: 26 additions & 0 deletions tests/Functional/BundleTest.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php
namespace Librinfo\CRMBundle\Tests\Functional;
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
use Symfony\Component\DependencyInjection\Container;

class CRMBundleTest extends KernelTestCase
{
protected $container;

protected function setUp()
{
static::bootKernel();
/** @var Container $container */
$this->container = self::$kernel->getContainer();
}

public function testServicesAreInitializable()
{
$serviceIds = array_filter($this->container->getServiceIds(), function ($serviceId) {
return 0 === strpos($serviceId, 'librinfo_crm' . '.');
});
foreach ($serviceIds as $serviceId) {
$this->assertNotNull($this->container->get($serviceId));
}
}
}
52 changes: 52 additions & 0 deletions tests/Resources/App/AppKernel.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<?php

use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\Config\Loader\LoaderInterface;

class AppKernel extends Kernel
{
public function registerBundles()
{
$bundles = [
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
new Symfony\Bundle\SecurityBundle\SecurityBundle(),
new Symfony\Bundle\TwigBundle\TwigBundle(),
//new Symfony\Bundle\MonologBundle\MonologBundle(),
//new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(),
new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
//new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),

# Sonata
new Sonata\CoreBundle\SonataCoreBundle(),
new Sonata\BlockBundle\SonataBlockBundle(),
new Knp\Bundle\MenuBundle\KnpMenuBundle(),
new Sonata\DoctrineORMAdminBundle\SonataDoctrineORMAdminBundle(),
new Sonata\AdminBundle\SonataAdminBundle(),
//new Sonata\IntlBundle\SonataIntlBundle(),

# Blast
new Blast\CoreBundle\BlastCoreBundle(),
new Blast\BaseEntitiesBundle\BlastBaseEntitiesBundle(),

#LI
new Librinfo\CRMBundle\LibrinfoCRMBundle(),
];

return $bundles;
}

public function registerContainerConfiguration(LoaderInterface $loader)
{
$loader->load(__DIR__ . '/config/config.yml');
}

public function getCacheDir()
{
return sys_get_temp_dir() . '/Librinfo/CRMBundle/cache/' . $this->getEnvironment();
}

public function getLogDir()
{
return sys_get_temp_dir() . '/Librinfo/CRMBundle/logs';
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
<?php

/*
* This file is part of the Blast Project package.
*
* Copyright (C) 2015-2017 Libre Informatique
*
* This file is licenced under the GNU LGPL v3.
* For the full copyright and license information, please view the LICENSE.md
* file that was distributed with this source code.
*/

namespace AppBundle\Entity\OuterExtension\LibrinfoCRMBundle;

use Sylius\Component\Customer\Model\CustomerInterface;

trait AddressExtension
{
/**
* @var string
*/
protected $phoneNumber;
/**
* @var string
*/
protected $company;
/**
* @var CustomerInterface
*/
protected $customer;

/**
* {@inheritdoc}
*/
public function getCustomer()
{
return $this->customer;
}

/**
* {@inheritdoc}
*/
public function setCustomer(CustomerInterface $customer = null)
{
$this->customer = $customer;
}

/**
* {@inheritdoc}
*/
public function getPhoneNumber()
{
return $this->phoneNumber;
}

/**
* {@inheritdoc}
*/
public function setPhoneNumber($phoneNumber)
{
$this->phoneNumber = $phoneNumber;
}

/**
* {@inheritdoc}
*/
public function getCompany()
{
return $this->company;
}

/**
* {@inheritdoc}
*/
public function setCompany($company)
{
$this->company = $company;
}

/**
* @return string
*/
public function getFullName()
{
return sprintf(
'%s %s', $this->firstName, $this->lastName
);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php

/*
* This file is part of the Blast Project package.
*
* Copyright (C) 2015-2017 Libre Informatique
*
* This file is licenced under the GNU LGPL v3.
* For the full copyright and license information, please view the LICENSE.md
* file that was distributed with this source code.
*/

namespace AppBundle\Entity\OuterExtension\LibrinfoCRMBundle;

trait CircleExtension
{
}
Loading