Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
lib
unicaen
app
Commits
6dbfd57f
Commit
6dbfd57f
authored
Mar 26, 2014
by
Bertrand Gauthier
Browse files
Correction exception abandonnée.
parent
cba5694d
Changes
30
Hide whitespace changes
Inline
Side-by-side
src/UnicaenApp/Controller/Plugin/Exception/IllegalStateException.php
View file @
6dbfd57f
<?php
namespace
UnicaenApp\Controller\Plugin\Exception
;
use
UnicaenApp\Exception
;
use
UnicaenApp\Exception
\LogicException
;
/**
* Description of IllegalStateException
*
* @author Bertrand GAUTHIER <bertrand.gauthier at unicaen.fr>
*/
class
IllegalStateException
extends
Exception
class
IllegalStateException
extends
Logic
Exception
{
}
src/UnicaenApp/Entity/Ldap/AbstractEntity.php
View file @
6dbfd57f
<?php
namespace
UnicaenApp\Entity\Ldap
;
use
UnicaenApp\Exception\LogicException
;
use
UnicaenApp\Exception\MandatoryValueException
;
/**
...
...
@@ -37,7 +38,7 @@ abstract class AbstractEntity
{
if
(
$key
)
{
if
(
!
array_key_exists
(
$key
,
$this
->
data
))
{
throw
new
\
UnicaenApp\
Exception
(
"Attribut introuvable: '
$key
'."
);
throw
new
Logic
Exception
(
"Attribut introuvable: '
$key
'."
);
}
return
$this
->
data
[
$key
];
}
...
...
src/UnicaenApp/Entity/Ldap/People.php
View file @
6dbfd57f
...
...
@@ -3,6 +3,8 @@ namespace UnicaenApp\Entity\Ldap;
use
InvalidArgumentException
;
use
UnicaenApp\Exception\MandatoryValueException
;
use
UnicaenApp\Exception\LogicException
;
use
UnicaenApp\Exception\RuntimeException
;
/**
* Classe de représentation d'un individu de l'annuaire LDAP.
...
...
@@ -282,7 +284,7 @@ class People extends AbstractEntity
$cn
=
ldap_explode_dn
(
$dn
,
1
);
$cn
=
next
(
$cn
);
if
(
!
(
$group
=
$mapper
->
findOneByCn
(
$cn
)))
{
throw
new
\
UnicaenApp\
Exception
(
"Groupe LDAP introuvable avec le CN '
$cn
'."
);
throw
new
Runtime
Exception
(
"Groupe LDAP introuvable avec le CN '
$cn
'."
);
}
if
(
$dateObservation
&&
$dateObservation
>
$group
->
getSupannGroupeDateFin
())
{
continue
;
...
...
@@ -314,7 +316,7 @@ class People extends AbstractEntity
// si les groupes sont spécifiés par des CN ou DN, on les fetch pour pouvoir les filtrer selon leur date de fin
if
(
!
is_object
(
current
(
$group
)))
{
if
(
null
===
$mapper
)
{
throw
new
\
UnicaenApp\
Exception
(
throw
new
Logic
Exception
(
"Le mapper est requis car une date d'observation a été spécifiée et les groupes fournis ne sont pas des entités."
);
}
foreach
(
$group
as
$key
=>
$cnOuDn
)
{
...
...
src/UnicaenApp/Form/MultipageForm.php
View file @
6dbfd57f
<?php
namespace
UnicaenApp\Form
;
use
UnicaenApp\Exception\LogicException
;
/**
* Classe mère des formulaire multi-pages (saisie en plusieurs étapes).
*
...
...
@@ -113,7 +115,7 @@ abstract class MultipageForm extends \Zend\Form\Form
}
else
{
if
(
in_array
(
$fieldset
->
getName
(),
$this
->
fieldsetNames
))
{
throw
new
\
UnicaenApp\
Exception
(
"Ce fieldset a déjà été ajouté."
);
throw
new
Logic
Exception
(
"Ce fieldset a déjà été ajouté."
);
}
$navigationElement
=
new
Element\MultipageFormNav
(
self
::
NAME_NAV
);
...
...
@@ -303,16 +305,16 @@ abstract class MultipageForm extends \Zend\Form\Form
$fieldset
=
$fieldset
->
getName
();
}
if
(
!
is_string
(
$fieldset
))
{
throw
new
\
UnicaenApp\
Exception
(
"Format de fieldset spécifié invalide."
);
throw
new
Logic
Exception
(
"Format de fieldset spécifié invalide."
);
}
if
(
!
$this
->
has
(
$name
=
$fieldset
))
{
throw
new
\
UnicaenApp\
Exception
(
"Le fieldset '
$name
' spécifié n'a pas été trouvé dans le formulaire."
);
throw
new
Logic
Exception
(
"Le fieldset '
$name
' spécifié n'a pas été trouvé dans le formulaire."
);
}
$fieldset
=
$this
->
get
(
$name
);
if
(
!
$fieldset
->
has
(
self
::
NAME_NAV
))
{
throw
new
\
UnicaenApp\
Exception
(
"L'élément de navigation n'a pas été trouvé dans le fieldset spécifié."
);
throw
new
Logic
Exception
(
"L'élément de navigation n'a pas été trouvé dans le fieldset spécifié."
);
}
$nav
=
$fieldset
->
get
(
self
::
NAME_NAV
);
/* @var $nav Element\MultipageFormNav */
...
...
src/UnicaenApp/Form/View/Helper/FormDateInfSup.php
View file @
6dbfd57f
...
...
@@ -2,6 +2,7 @@
namespace
UnicaenApp\Form\View\Helper
;
use
Zend\Form\Element\Text
;
use
UnicaenApp\Exception\LogicException
;
use
UnicaenApp\Form\Element\DateInfSup
;
/**
...
...
@@ -258,7 +259,7 @@ EOS;
public
function
getJavascript
()
{
if
(
!
$this
->
element
)
{
throw
new
\
UnicaenApp\
Exception
(
"Aucun élément spécifié, appelez render() auparavant."
);
throw
new
Logic
Exception
(
"Aucun élément spécifié, appelez render() auparavant."
);
}
$dateFormat
=
DateInfSup
::
DATE_FORMAT_JAVASCRIPT
;
...
...
src/UnicaenApp/Form/View/Helper/FormSearchAndSelect.php
View file @
6dbfd57f
<?php
namespace
UnicaenApp\Form\View\Helper
;
use
UnicaenApp\Exception\LogicException
;
use
UnicaenApp\Form\Element\SearchAndSelect
;
use
Zend\Form\Element\Text
;
use
Zend\Form\ElementInterface
;
...
...
@@ -115,12 +116,12 @@ EOS;
/**
*
* @return string
* @throws
\UnicaenApp\
Exception
* @throws
Logic
Exception
*/
public
function
getJavascript
()
{
if
(
!
$this
->
element
)
{
throw
new
\
UnicaenApp\
Exception
(
"Aucun élément spécifié, appelez render() auparavant."
);
throw
new
Logic
Exception
(
"Aucun élément spécifié, appelez render() auparavant."
);
}
$elementDomId
=
$this
->
element
->
getAttribute
(
'id'
);
...
...
src/UnicaenApp/Mapper/Ldap/AbstractMapper.php
View file @
6dbfd57f
...
...
@@ -2,6 +2,7 @@
namespace
UnicaenApp\Mapper\Ldap
;
use
Zend\Ldap\Ldap
;
use
UnicaenApp\Exception\RuntimeException
;
/**
* Classe mère des services d'accès à l'annuaire LDAP.
...
...
@@ -73,7 +74,7 @@ abstract class AbstractMapper
}
$entries
=
$this
->
getLdap
()
->
searchEntries
(
$filter
,
$baseDn
,
$scope
,
$attributes
,
$sort
);
if
(
count
(
$entries
)
>
1
)
{
throw
new
\
UnicaenApp\
Exception
(
"Plus d'une entrée trouvée avec ce filtre: "
.
$filter
);
throw
new
Runtime
Exception
(
"Plus d'une entrée trouvée avec ce filtre: "
.
$filter
);
}
if
(
!
$entries
)
{
return
null
;
...
...
src/UnicaenApp/Mapper/Ldap/Group.php
View file @
6dbfd57f
<?php
namespace
UnicaenApp\Mapper\Ldap
;
use
UnicaenApp\Exception\LogicException
;
use
UnicaenApp\Exception\RuntimeException
;
use
UnicaenApp\Entity\Ldap\Group
as
LdapGroupModel
;
/**
...
...
@@ -134,12 +136,12 @@ class Group extends AbstractMapper
foreach
(
$groups
as
$group
)
{
if
(
!
is_object
(
$group
))
{
if
(
!
$mapper
)
{
throw
new
\
UnicaenApp\
Exception
(
"Le mapper est requis car un groupe n'est pas fourni au format objet."
);
throw
new
Logic
Exception
(
"Le mapper est requis car un groupe n'est pas fourni au format objet."
);
}
$cn
=
count
(
$tmp
=
ldap_explode_dn
(
$group
,
1
))
>
1
?
$tmp
[
0
]
:
$group
;
$group
=
$mapper
->
findOneByCn
(
$cn
);
if
(
!
$group
)
{
throw
new
\
UnicaenApp\
Exception
(
"Groupe LDAP introuvable avec le CN '
$cn
'."
);
throw
new
Runtime
Exception
(
"Groupe LDAP introuvable avec le CN '
$cn
'."
);
}
}
if
(
$dateObservation
>
$group
->
getSupannGroupeDateFin
())
{
...
...
src/UnicaenApp/Mapper/Ldap/People.php
View file @
6dbfd57f
<?php
namespace
UnicaenApp\Mapper\Ldap
;
use
UnicaenApp\Exception\LogicException
;
use
UnicaenApp\Exception\RuntimeException
;
/**
* Classe regroupant les opérations de recherche d'individu dans l'annuaire LDAP.
*
...
...
@@ -222,7 +226,7 @@ class People extends AbstractMapper
$s
=
$this
->
getMapperStructure
()
->
findOneByCodeEntite
(
$code
);
// 2e tentative : on suppose que la structure est spécifiée par un code Harpege (ex: 'C68')
if
(
!
$s
&&
!
(
$s
=
$this
->
getMapperStructure
()
->
findOneByCodeStructure
(
$code
)))
{
throw
new
\
UnicaenApp\
Exception
(
"Structure introuvable, '
$code
' n'est ni un code entité Supann ni un code Harpege valide."
);
throw
new
Runtime
Exception
(
"Structure introuvable, '
$code
' n'est ni un code entité Supann ni un code Harpege valide."
);
}
}
$structures
[]
=
$s
;
...
...
@@ -275,7 +279,7 @@ class People extends AbstractMapper
// on s'assure que la structure éventuelle est au format objet
if
(
is_string
(
$structure
))
{
if
(
!
(
$structure
=
$this
->
getMapperStructure
()
->
findOneByDnOrCodeEntite
(
$id
=
$structure
)))
{
throw
new
\
UnicaenApp\
Exception
(
"Structure introuvable dans l'annuaire avec le DN ou code entité '
$id
'."
);
throw
new
Runtime
Exception
(
"Structure introuvable dans l'annuaire avec le DN ou code entité '
$id
'."
);
}
/* @var $structure \UnicaenApp\Entity\Ldap\Structure */
}
...
...
@@ -330,7 +334,7 @@ class People extends AbstractMapper
if
(
$structure
)
{
if
(
is_string
(
$structure
))
{
if
(
!
(
$structure
=
$this
->
getMapperStructure
()
->
findOneByDnOrCodeEntite
(
$id
=
$structure
)))
{
throw
new
\
UnicaenApp\
Exception
(
"Structure introuvable dans l'annuaire avec le DN ou code entité '
$id
'."
);
throw
new
Runtime
Exception
(
"Structure introuvable dans l'annuaire avec le DN ou code entité '
$id
'."
);
}
}
$codeEntite
=
$structure
->
getSupannCodeEntite
();
...
...
@@ -375,7 +379,7 @@ class People extends AbstractMapper
// on s'assure que la structure est au format objet
if
(
is_string
(
$structure
))
{
if
(
!
(
$structure
=
$this
->
getMapperStructure
()
->
findOneByDnOrCodeEntite
(
$id
=
$structure
)))
{
throw
new
\
UnicaenApp\
Exception
(
"Structure introuvable dans l'annuaire avec le DN ou code entité '
$id
'."
);
throw
new
Runtime
Exception
(
"Structure introuvable dans l'annuaire avec le DN ou code entité '
$id
'."
);
}
}
/* @var $structure \UnicaenApp\Entity\Ldap\Structure */
...
...
src/UnicaenApp/Service/Doctrine/MultipleDbAbstractFactory.php
View file @
6dbfd57f
...
...
@@ -13,7 +13,7 @@ use DoctrineORMModule\Service\EntityManagerFactory;
use
DoctrineORMModule\Service\EntityResolverFactory
;
use
DoctrineORMModule\Service\SQLLoggerCollectorFactory
;
use
DoctrineORMModule\Collector\MappingCollector
;
use
UnicaenApp\Exception
;
use
UnicaenApp\Exception
\LogicException
;
use
Zend\ServiceManager\AbstractFactoryInterface
;
use
Zend\ServiceManager\FactoryInterface
;
use
Zend\ServiceManager\ServiceLocatorInterface
;
...
...
@@ -176,7 +176,7 @@ class MultipleDbAbstractFactory implements AbstractFactoryInterface
$factory
=
new
AuthenticationServiceFactory
(
$serviceName
);
break
;
default
:
throw
new
Exception
(
"Type de service imprévu : '
$serviceType
'."
);
throw
new
Logic
Exception
(
"Type de service imprévu : '
$serviceType
'."
);
break
;
}
// "DoctrineORMModule\Form\Annotation\AnnotationBuilder" => function(Zend\Di\ServiceLocatorInterface $sl) {
...
...
src/UnicaenApp/Util.php
View file @
6dbfd57f
<?php
namespace
UnicaenApp
;
use
UnicaenApp\Exception\LogicException
;
use
UnicaenApp\Exception\RuntimeException
;
/**
* Regroupe des méthodes statiques utilitaires.
*
...
...
@@ -109,10 +113,10 @@ class Util
static
public
function
getObjectAttributeFromPath
(
$object
,
$path
)
{
if
(
!
is_object
(
$object
))
{
throw
new
Exception
(
"Le premier argument doit être un objet."
);
throw
new
Logic
Exception
(
"Le premier argument doit être un objet."
);
}
if
(
!
is_string
(
$path
))
{
throw
new
Exception
(
"Le deuxième argument doit être une chaîne de caractère (ex: 'poste.no_poste')."
);
throw
new
Logic
Exception
(
"Le deuxième argument doit être une chaîne de caractère (ex: 'poste.no_poste')."
);
}
$value
=
$object
;
...
...
@@ -129,11 +133,11 @@ class Util
$value
=
$value
->
$attr
();
}
else
{
throw
new
Exception
(
throw
new
Logic
Exception
(
"L'attribut '
$attr
' spécifié dans le chemin '
$path
' n'est ni un attribut accessible ni une méthode existante."
);
}
if
((
!
$value
||
!
is_object
(
$value
))
&&
$index
!==
count
(
$attributes
)
-
1
)
{
throw
new
Exception
(
throw
new
Logic
Exception
(
"L'attribut non terminal '
$attr
' spécifié dans le chemin '
$path
' retourne une valeur nulle ou un scalaire."
);
}
}
...
...
@@ -189,21 +193,20 @@ class Util
* @param string $source Chemin complet de la source
* @param string $destination Chemin complet de l'archive à créer.
* @return \ZipArchive
* @throws \InvalidArgumentException
* @throws \RuntimeException
* @throws RuntimeException
*/
public
static
function
zip
(
$source
,
$destination
)
{
if
(
!
extension_loaded
(
'zip'
))
{
throw
new
\
RuntimeException
(
"Extension PHP 'zip' non chargée."
);
throw
new
RuntimeException
(
"Extension PHP 'zip' non chargée."
);
}
if
(
!
file_exists
(
$source
))
{
throw
new
\
InvalidArgument
Exception
(
"Le fichier ou répertoire source spécifié n'existe pas."
);
throw
new
Runtime
Exception
(
"Le fichier ou répertoire source spécifié n'existe pas."
);
}
$zip
=
new
\
ZipArchive
();
if
(
true
!==
$res
=
$zip
->
open
(
$destination
,
\
ZipArchive
::
CREATE
))
{
throw
new
\
RuntimeException
(
"Impossible de créer l'archive '
$destination
'."
);
throw
new
RuntimeException
(
"Impossible de créer l'archive '
$destination
'."
);
}
$source
=
str_replace
(
'\\'
,
'/'
,
realpath
(
$source
));
...
...
@@ -240,7 +243,7 @@ class Util
static
public
function
removeFile
(
$fileOrDirectoryPath
)
{
if
(
!
file_exists
(
$fileOrDirectoryPath
))
{
throw
new
\
InvalidArgument
Exception
(
"Le fichier ou répertoire '
$fileOrDirectoryPath
' n'existe pas."
);
throw
new
Runtime
Exception
(
"Le fichier ou répertoire '
$fileOrDirectoryPath
' n'existe pas."
);
}
if
(
is_file
(
$fileOrDirectoryPath
))
{
...
...
@@ -253,7 +256,7 @@ class Util
$ouverture
=
@
opendir
(
$fileOrDirectoryPath
);
if
(
!
$ouverture
)
{
throw
new
\
RuntimeException
(
"Impossible d'ouvrir le répertoire <
$fileOrDirectoryPath
>."
);
throw
new
RuntimeException
(
"Impossible d'ouvrir le répertoire <
$fileOrDirectoryPath
>."
);
}
while
(
$fichier
=
readdir
(
$ouverture
))
{
if
(
$fichier
==
'.'
||
$fichier
==
'..'
)
{
...
...
src/UnicaenApp/View/Helper/AppInfos.php
View file @
6dbfd57f
...
...
@@ -2,7 +2,7 @@
namespace
UnicaenApp\View\Helper
;
use
Traversable
;
use
UnicaenApp\Exception
;
use
UnicaenApp\Exception
\LogicException
;
use
UnicaenApp\View\Helper\AppInfos
;
use
Zend\Config\Config
;
use
Zend\I18n\View\Helper\AbstractTranslatorHelper
;
...
...
@@ -173,10 +173,10 @@ class AppInfos extends AbstractTranslatorHelper
$config
=
$config
->
toArray
();
}
else
if
(
!
is_array
(
$config
))
{
throw
new
Exception
(
"La configuration spécifiée est invalide."
);
throw
new
Logic
Exception
(
"La configuration spécifiée est invalide."
);
}
if
(
!
$config
)
{
throw
new
Exception
(
"La configuration spécifiée est vide."
);
throw
new
Logic
Exception
(
"La configuration spécifiée est vide."
);
}
$valid
=
array
();
foreach
(
$config
as
$key
=>
$value
)
{
...
...
src/UnicaenApp/View/Helper/AppLink.php
View file @
6dbfd57f
...
...
@@ -4,6 +4,7 @@ namespace UnicaenApp\View\Helper;
use
Zend\I18n\View\Helper\AbstractTranslatorHelper
;
use
Zend\Mvc\Router\RouteMatch
;
use
Zend\Mvc\Router\RouteStackInterface
;
use
UnicaenApp\Exception\LogicException
;
/**
* Aide de vue dessinant le titre (de niveau 1) de l'application sous forme d'un lien
...
...
@@ -65,7 +66,7 @@ class AppLink extends AbstractTranslatorHelper
protected
function
render
()
{
if
(
!
$this
->
title
)
{
throw
new
\
UnicaenApp\
Exception
(
"Aucun titre spécifié."
);
throw
new
Logic
Exception
(
"Aucun titre spécifié."
);
}
$appName
=
$this
->
title
;
...
...
src/UnicaenApp/View/Helper/Messenger.php
View file @
6dbfd57f
<?php
namespace
UnicaenApp\View\Helper
;
use
UnicaenApp\Exception
;
use
UnicaenApp\Exception
\LogicException
;
use
UnicaenApp\View\Helper\Messenger
;
use
Zend\View\Helper\AbstractHelper
;
...
...
@@ -66,8 +66,13 @@ class Messenger extends AbstractHelper
*/
public
function
__toString
()
{
return
$this
->
render
();
}
try
{
return
$this
->
render
();
}
catch
(
\
Exception
$exc
)
{
var_dump
(
$exc
->
getMessage
(),
$exc
->
getTraceAsString
());
die
;
}
}
/**
* Génère le code HTML.
...
...
@@ -247,7 +252,7 @@ class Messenger extends AbstractHelper
public
function
getTemplate
(
$severity
,
$containerId
=
null
)
{
if
(
!
isset
(
$this
->
uiClasses
[
$severity
]))
{
throw
new
Exception
(
"Sévérité inconnue: "
.
$severity
);
throw
new
Logic
Exception
(
"Sévérité inconnue: "
.
$severity
);
}
$innerTemplate
=
$this
->
containerInnerTemplate
?:
'%s'
;
...
...
src/UnicaenApp/View/Helper/Navigation/MenuContextuel.php
View file @
6dbfd57f
...
...
@@ -6,6 +6,7 @@ use Zend\Navigation\AbstractContainer;
use
Zend\View\Helper\Navigation\Menu
;
use
Zend\Navigation\Navigation
;
use
Zend\Navigation\Page\AbstractPage
;
use
UnicaenApp\Exception\LogicException
;
use
UnicaenApp\Exception\RuntimeException
;
/**
...
...
@@ -418,7 +419,7 @@ class MenuContextuel extends Menu
}
if
(
!
$criteres
)
{
throw
new
Runtime
Exception
(
"Aucun critère d'inclusion de pages fourni"
);
throw
new
Logic
Exception
(
"Aucun critère d'inclusion de pages fourni"
);
}
$this
->
updated
=
true
;
...
...
@@ -469,7 +470,7 @@ class MenuContextuel extends Menu
}
if
(
!
$criteres
)
{
throw
new
Runtime
Exception
(
"Aucun critère d'exclusion de pages fourni"
);
throw
new
Logic
Exception
(
"Aucun critère d'exclusion de pages fourni"
);
}
$this
->
updated
=
true
;
...
...
tests/Bootstrap.php
View file @
6dbfd57f
...
...
@@ -18,17 +18,28 @@ class Bootstrap
public
static
function
init
()
{
$zf2ModulePaths
=
array
(
dirname
(
dirname
(
__DIR__
))
)
;
$zf2ModulePaths
=
array
(
dirname
(
__DIR__
));
if
((
$path
=
static
::
findParentPath
(
'vendor'
)))
{
$zf2ModulePaths
[]
=
$path
;
}
if
((
$path
=
static
::
findParentPath
(
'module'
))
!==
$zf2ModulePaths
[
0
])
{
$zf2ModulePaths
[]
=
$path
;
}
$zf2ModulePaths
[]
=
__DIR__
;
static
::
initAutoloader
();
// // use ModuleManager to load this module and it's dependencies
// $config = array(
// 'module_listener_options' => array(
// 'module_paths' => $zf2ModulePaths,
// ),
// 'modules' => array(
// 'UnicaenApp'
// )
// );
//
// $serviceManager = new ServiceManager(new ServiceManagerConfig());
// $serviceManager->setService('ApplicationConfig', $config);
// $serviceManager->get('ModuleManager')->loadModules();
// static::$serviceManager = $serviceManager;
static
::
$serviceManager
=
new
ServiceManager
(
new
ServiceManagerConfig
());
}
...
...
tests/UnicaenAppTest/Entity/Ldap/GroupTest.php
View file @
6dbfd57f
...
...
@@ -122,7 +122,7 @@ class GroupTest extends PHPUnit_Framework_TestCase
/**
* @depends testConstructWithValidData
* @dataProvider provideConstructorValidData
* @expectedException \UnicaenApp\Exception
* @expectedException \UnicaenApp\Exception
\LogicException
*/
public
function
testGettingDataWithNonExistingSpecificKeyThrowsException
(
$data
)
{
...
...
tests/UnicaenAppTest/Entity/Ldap/PeopleTest.php
View file @
6dbfd57f
...
...
@@ -607,7 +607,7 @@ class PeopleTest extends PHPUnit_Framework_TestCase
}
/**
* @expectedException \UnicaenApp\Exception
* @expectedException \UnicaenApp\Exception
\RuntimeException
*/
public
function
testGetMemberOfGroupThrowsExceptionWhenNoGroupFound
()
{
...
...
@@ -699,7 +699,7 @@ class PeopleTest extends PHPUnit_Framework_TestCase
}
/**
* @expectedException \UnicaenApp\Exception
* @expectedException \UnicaenApp\Exception
\LogicException
*/
public
function
testIsMemberOfWithDateButNoMapperSpecifiedThrowsException
()
{
...
...
tests/UnicaenAppTest/Exporter/PdfTest.php
View file @
6dbfd57f
...
...
@@ -312,7 +312,7 @@ class PdfTest extends PHPUnit_Framework_TestCase
}
/**
* @expectedException \UnicaenApp\Exception
* @expectedException \UnicaenApp\Exception
\LogicException
* @expectedExceptionMessage Aucun script spécifié.
*/
public
function
testExportingThrowsExceptionIfNoScriptSpecified
()
...
...
@@ -321,7 +321,7 @@ class PdfTest extends PHPUnit_Framework_TestCase
}
/**
* @expectedException \UnicaenApp\Exception
* @expectedException \UnicaenApp\Exception
\LogicException
*/
public
function
testExportingWithoutSpecifyingPdfFilenameThrowsException
()
{
...
...
tests/UnicaenAppTest/Form/MultipageFormTest.php
View file @
6dbfd57f
...
...
@@ -2,7 +2,7 @@
namespace
UnicaenAppTest\Form
;
use
PHPUnit_Framework_TestCase
;
use
UnicaenApp\Exception
;
use
UnicaenApp\Exception
\LogicException
;
use
UnicaenApp\Form\MultipageForm
;
use
Zend\Form\Element\Checkbox
;
use
Zend\Form\Element\Select
;
...
...
@@ -41,7 +41,7 @@ class MultipageFormTest extends PHPUnit_Framework_TestCase
}
/**
* @expectedException Exception
* @expectedException
Logic
Exception
*/
public
function
testAddingSameFirstFieldsetTwiceThrowsException
()
{
...
...
@@ -51,7 +51,7 @@ class MultipageFormTest extends PHPUnit_Framework_TestCase
}
/**
* @expectedException Exception
* @expectedException
Logic
Exception
*/
public
function
testAddingSameNextFieldsetAsFirstOneThrowsException
()
{
...
...
@@ -75,7 +75,7 @@ class MultipageFormTest extends PHPUnit_Framework_TestCase
}
/**
* @expectedException Exception
* @expectedException
Logic
Exception
*/
public
function
testAddingSameNextFieldsetTwiceThrowsException
()
{
...
...
@@ -87,7 +87,7 @@ class MultipageFormTest extends PHPUnit_Framework_TestCase
}
/**
* @expectedException Exception
* @expectedException
Logic
Exception
*/
public
function
testAddingSameLastFieldsetAsFirstOneThrowsException
()
{
...
...
@@ -97,7 +97,7 @@ class MultipageFormTest extends PHPUnit_Framework_TestCase
}
/**
* @expectedException Exception
* @expectedException
Logic
Exception
*/
public
function
testAddingSameLastFieldsetAsNextOneThrowsException
()
{
...
...
@@ -109,7 +109,7 @@ class MultipageFormTest extends PHPUnit_Framework_TestCase
}
/**
* @expectedException Exception
* @expectedException
Logic
Exception
*/
public
function
testAddingSameLastFieldsetTwiceThrowsException
()
{
...
...
Prev
1
2
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment