Commit a39550ce authored by Stephane Bouvry's avatar Stephane Bouvry
Browse files

Fix : tests unitaires

parent 2f049378
Loading
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -73,8 +73,8 @@ class JsonToOrganization extends JsonToObject implements IJsonToOrganisation
            ->setEmail($this->getFieldValue($jsonData, 'email'))
            ->setUrl($this->getFieldValue($jsonData, 'url'))
            ->setSiret($this->getFieldValue($jsonData, 'siret'))
            ->setType($this->getFieldValue($jsonData, 'type'))
            ->setTypeObj($this->getTypeObj($this->getFieldValue($jsonData, 'type')))
            ->setType($this->getFieldValue($jsonData, 'type', ''))
            ->setTypeObj($this->getTypeObj($this->getFieldValue($jsonData, 'type', '')))

            // Ajout de champs
            ->setDuns($this->getFieldValue($jsonData, 'duns'))
+1 −1
Original line number Diff line number Diff line
@@ -169,7 +169,7 @@ class DateTimeUtils
     * @param mixed ...$bounds
     * @return array
     */
    public function allPeriodsFromDates(...$bounds)
    public static function allPeriodsFromDates(...$bounds)
    {
        $out = [];
        foreach ($bounds as $bound) {
+4 −2
Original line number Diff line number Diff line
@@ -10,8 +10,10 @@ class JsonToOrganizationFactoryTest extends TestCase {
     */
    protected function getFactory(){
        static $factory;
        if( $factory === null )
            $factory = new \Oscar\Factory\JsonToOrganization();
        if( $factory === null ) {
            $types = [];
            $factory = new \Oscar\Factory\JsonToOrganization($types);
        }
        return $factory;
    }