Skip to content

Commit

Permalink
indentation and style
Browse files Browse the repository at this point in the history
  • Loading branch information
François GERBES committed May 19, 2017
1 parent a586e80 commit b6f1918
Show file tree
Hide file tree
Showing 4 changed files with 106 additions and 51 deletions.
4 changes: 2 additions & 2 deletions tests/Resources/autoload_outer_extension.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
*
* Copyright (C) 2015-2017 Libre Informatique
*
* This file is licenced under the GNU GPL v3.
* For the full copyright and license information, please view the LICENSE
* 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.
*/

Expand Down
7 changes: 6 additions & 1 deletion tests/Resources/bootstrap.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
<?php

/*
* This file is part of the Blast Project package.
*
* For the full copyright and license information, please view the LICENSE
* 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.
*/

// fix encoding issue while running text on different host with different locale configuration
setlocale(LC_ALL, 'en_US.UTF-8');
if (file_exists($file = __DIR__.'/autoload.php')) {
Expand Down
31 changes: 21 additions & 10 deletions tests/Unit/CreateUserCommandTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
<?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 Librinfo\SonataSyliusUserBundle\Command\Test\Unit;

use Librinfo\SonataSyliusUserBundle\Command\CreateUserCommand;
Expand All @@ -10,7 +20,6 @@

class CreateUserCommandTest extends TestCase
{

/**
* @var CreateUserCommand
*/
Expand All @@ -21,39 +30,41 @@ class CreateUserCommandTest extends TestCase
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed.
*/
protected function setUp() {
protected function setUp()
{
$this->myCommand = new CreateUserCommand();
}

/**
* Tears down the fixture, for example, closes a network connection.
* This method is called after a test is executed.
*/
protected function tearDown() {
protected function tearDown()
{
}

/**
* @covers Librinfo\SonataSyliusUserBundle\Command\CreateUserCommand::configure
* @covers \Librinfo\SonataSyliusUserBundle\Command\CreateUserCommand::configure
*
* @todo Implement testConfigure().
*/
public function testConfigure() {
public function testConfigure()
{
$this->markTestIncomplete('This test has not been implemented yet.');

$this->myCommand->configure();

$this->myConfig = $this->myCommand->getName();
/**
/*
* @todo : check if we need to test more (or not)
*/
$this->assertContains('user', $this->myConfig);
}

public function testExecute() {

public function testExecute()
{
/*
* @todo : Is it really relevant to perform tests on it?
*/
}

}
115 changes: 77 additions & 38 deletions tests/Unit/SonataGroupTest.php
Original file line number Diff line number Diff line change
@@ -1,17 +1,26 @@
<?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 Librinfo\SonataSyliusUserBundle\Entity\Test\Unit;

use Librinfo\SonataSyliusUserBundle\Entity\SonataGroup;
use Symfony\Component\Security\Core\User\AdvancedUserInterface;
/**
/*
* Generated by PHPUnit_SkeletonGenerator on 2017-05-10 at 17:49:31.
*/
use PHPUnit\Framework\TestCase;

class SonataGroupTest extends TestCase
{

/**
* @var SonataGroup
*/
Expand All @@ -21,32 +30,37 @@ class SonataGroupTest extends TestCase
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed.
*/
protected function setUp() {
$this->object = new SonataGroup;
protected function setUp()
{
$this->object = new SonataGroup();
}

/**
* Tears down the fixture, for example, closes a network connection.
* This method is called after a test is executed.
*/
protected function tearDown() {
protected function tearDown()
{
}

/**
* @covers Librinfo\SonataSyliusUserBundle\Entity\SonataGroup::__toString
* @covers \Librinfo\SonataSyliusUserBundle\Entity\SonataGroup::__toString
*
* @todo Implement test__toString().
*/
public function test__toString() {
public function test__toString()
{
// Remove the following lines when you implement this test.
$this->markTestIncomplete('This test has not been implemented yet.');
}

/**
* @covers Librinfo\SonataSyliusUserBundle\Entity\SonataGroup::addRole
* @covers \Librinfo\SonataSyliusUserBundle\Entity\SonataGroup::addRole
*
* @todo Implement testAddRole().
*/
public function testAddRole() {
public function testAddRole()
{
/**
* @todo 1.appeler addRole
* 2. appeler getRoles
Expand All @@ -64,46 +78,56 @@ public function testAddRole() {
}

/**
* @covers Librinfo\SonataSyliusUserBundle\Entity\SonataGroup::getId
* @covers \Librinfo\SonataSyliusUserBundle\Entity\SonataGroup::getId
*
* @todo Implement testGetId().
*/
public function testGetId() {
// Remove the following lines when you implement this test.
public function testGetId()
{
// Remove the following lines when you implement this test.
$this->markTestIncomplete('This test has not been implemented yet.');
}

/**
* @covers Librinfo\SonataSyliusUserBundle\Entity\SonataGroup::getName
* @covers \Librinfo\SonataSyliusUserBundle\Entity\SonataGroup::getName
*
* @todo Implement testGetName().
*/
public function testGetName() {
public function testGetName()
{
// Remove the following lines when you implement this test.
$this->markTestIncomplete('This test has not been implemented yet.');
}

/**
* @covers Librinfo\SonataSyliusUserBundle\Entity\SonataGroup::hasRole
* @covers \Librinfo\SonataSyliusUserBundle\Entity\SonataGroup::hasRole
*
* @todo Implement testHasRole().
*/
public function testHasRole() {
public function testHasRole()
{
// Remove the following lines when you implement this test.
$this->markTestIncomplete('This test has not been implemented yet.');
}

/**
* @covers Librinfo\SonataSyliusUserBundle\Entity\SonataGroup::getRoles
* @covers \Librinfo\SonataSyliusUserBundle\Entity\SonataGroup::getRoles
*
* @todo Implement testGetRoles().
*/
public function testGetRoles() {
public function testGetRoles()
{
// Remove the following lines when you implement this test.
$this->markTestIncomplete('This test has not been implemented yet.');
}

/**
* @covers Librinfo\SonataSyliusUserBundle\Entity\SonataGroup::removeRole
* @covers \Librinfo\SonataSyliusUserBundle\Entity\SonataGroup::removeRole
*
* @todo Implement testRemoveRole().
*/
public function testRemoveRole() {
public function testRemoveRole()
{
$role = 'foo';
$role2 = 'bar';
$role3 = 'zoo';
Expand All @@ -122,28 +146,34 @@ public function testRemoveRole() {
}

/**
* @covers Librinfo\SonataSyliusUserBundle\Entity\SonataGroup::setName
* @covers \Librinfo\SonataSyliusUserBundle\Entity\SonataGroup::setName
*
* @todo Implement testSetName().
*/
public function testSetName() {
public function testSetName()
{
// Remove the following lines when you implement this test.
$this->markTestIncomplete('This test has not been implemented yet.');
}

/**
* @covers Librinfo\SonataSyliusUserBundle\Entity\SonataGroup::setRoles
* @covers \Librinfo\SonataSyliusUserBundle\Entity\SonataGroup::setRoles
*
* @todo Implement testSetRoles().
*/
public function testSetRoles() {
public function testSetRoles()
{
// Remove the following lines when you implement this test.
$this->markTestIncomplete('This test has not been implemented yet.');
}

/**
* @covers Librinfo\SonataSyliusUserBundle\Entity\SonataGroup::addUser
* @covers \Librinfo\SonataSyliusUserBundle\Entity\SonataGroup::addUser
*
* @todo Implement testAddUser().
*/
public function testAddUser() {
public function testAddUser()
{
$this->markTestIncomplete('This test has not been implemented yet.');

$toto = 'weekend';
Expand All @@ -155,10 +185,12 @@ public function testAddUser() {
}

/**
* @covers Librinfo\SonataSyliusUserBundle\Entity\SonataGroup::removeUser
* @covers \Librinfo\SonataSyliusUserBundle\Entity\SonataGroup::removeUser
*
* @todo Implement testRemoveUser().
*/
public function testRemoveUser() {
public function testRemoveUser()
{
$this->markTestIncomplete('This test has not been implemented yet.');

$toto = 'lundi matin';
Expand All @@ -174,39 +206,46 @@ public function testRemoveUser() {
}

/**
* @covers Librinfo\SonataSyliusUserBundle\Entity\SonataGroup::getUsers
* @covers \Librinfo\SonataSyliusUserBundle\Entity\SonataGroup::getUsers
*
* @todo Implement testGetUsers().
*/
public function testGetUsers() {
public function testGetUsers()
{
// Remove the following lines when you implement this test.
$this->markTestIncomplete('This test has not been implemented yet.');
}

/**
* @covers Librinfo\SonataSyliusUserBundle\Entity\SonataGroup::setUsers
* @covers \Librinfo\SonataSyliusUserBundle\Entity\SonataGroup::setUsers
*
* @todo Implement testSetUsers().
*/
public function testSetUsers() {
public function testSetUsers()
{
// Remove the following lines when you implement this test.
$this->markTestIncomplete('This test has not been implemented yet.');
}

/**
* @covers Librinfo\SonataSyliusUserBundle\Entity\SonataGroup::setId
* @covers \Librinfo\SonataSyliusUserBundle\Entity\SonataGroup::setId
*
* @todo Implement testSetId().
*/
public function testSetId() {
public function testSetId()
{
// Remove the following lines when you implement this test.
$this->markTestIncomplete('This test has not been implemented yet.');
}

/**
* @covers Librinfo\SonataSyliusUserBundle\Entity\SonataGroup::isNew
* @covers \Librinfo\SonataSyliusUserBundle\Entity\SonataGroup::isNew
*
* @todo Implement testIsNew().
*/
public function testIsNew() {
public function testIsNew()
{
// Remove the following lines when you implement this test.
$this->markTestIncomplete('This test has not been implemented yet.');
}

}

0 comments on commit b6f1918

Please sign in to comment.