Skip to content

Commit

Permalink
Merge pull request #112 from demvsystems/themen-update
Browse files Browse the repository at this point in the history
Themen Update
  • Loading branch information
kenowessels authored Apr 9, 2018
2 parents 9976622 + ccdc460 commit 9fcf3fe
Show file tree
Hide file tree
Showing 15 changed files with 211 additions and 16 deletions.
14 changes: 14 additions & 0 deletions src/Werte/Bedarf/Thema/Bedarfsthemen.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,17 @@
use Demv\Werte\AbstractProvider;
use Demv\Werte\Bedarf\Thema\Themen\Altersvorsorge;
use Demv\Werte\Bedarf\Thema\Themen\Berufsunfaehigkeit;
use Demv\Werte\Bedarf\Thema\Themen\Hausrat;
use Demv\Werte\Bedarf\Thema\Themen\Kfz;
use Demv\Werte\Bedarf\Thema\Themen\Krankentagegeld;
use Demv\Werte\Bedarf\Thema\Themen\KVZStationaer;
use Demv\Werte\Bedarf\Thema\Themen\Pflegevorsorge;
use Demv\Werte\Bedarf\Thema\Themen\PrivateKrankenversicherung;
use Demv\Werte\Bedarf\Thema\Themen\Privathaftpflicht;
use Demv\Werte\Bedarf\Thema\Themen\Rechtsschutz;
use Demv\Werte\Bedarf\Thema\Themen\Risikoleben;
use Demv\Werte\Bedarf\Thema\Themen\Unfallversicherung;
use Demv\Werte\Bedarf\Thema\Themen\Wohngebaeude;
use Demv\Werte\Bedarf\Thema\Themen\Zahnzusatz;
use Demv\Werte\Exception\EntryNotFoundException;

Expand All @@ -30,6 +37,13 @@ public function __construct()
$this->appendMember(new KVZStationaer());
$this->appendMember(new Zahnzusatz());
$this->appendMember(new Krankentagegeld());
$this->appendMember(new Hausrat());
$this->appendMember(new Kfz());
$this->appendMember(new Pflegevorsorge());
$this->appendMember(new Privathaftpflicht());
$this->appendMember(new Rechtsschutz());
$this->appendMember(new Unfallversicherung());
$this->appendMember(new Wohngebaeude());
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Werte/Bedarf/Thema/Themen/Berufsunfaehigkeit.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ final class Berufsunfaehigkeit extends Bedarfsthema
*/
public function __construct()
{
parent::__construct(self::ID, 'Berufsunfähigkeit', [Vorsorge::BERUFSUNFAEHIGKEITSVERSICHERUNG]);
parent::__construct(self::ID, 'Berufsunfähigkeitsversichergung', [Vorsorge::BERUFSUNFAEHIGKEITSVERSICHERUNG]);
}
}
23 changes: 23 additions & 0 deletions src/Werte/Bedarf/Thema/Themen/Hausrat.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php

namespace Demv\Werte\Bedarf\Thema\Themen;

use Demv\Werte\Bedarf\Thema\Bedarfsthema;
use Demv\Werte\Sparte\Sparten\PrivateSachversicherung;

/**
* Class Hausrat
* @package Demv\Werte\Bedarf\Thema\Themen
*/
final class Hausrat extends Bedarfsthema
{
const ID = 11;

/**
* Hausrat constructor.
*/
public function __construct()
{
parent::__construct(self::ID, 'Hausrat', [PrivateSachversicherung::HAUSRAT]);
}
}
23 changes: 23 additions & 0 deletions src/Werte/Bedarf/Thema/Themen/Kfz.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php

namespace Demv\Werte\Bedarf\Thema\Themen;

use Demv\Werte\Bedarf\Thema\Bedarfsthema;
use Demv\Werte\Sparte\Sparten\PrivateSachversicherung;

/**
* Class Kfz
* @package Demv\Werte\Bedarf\Thema\Themen
*/
final class Kfz extends Bedarfsthema
{
const ID = 14;

/**
* Kfz constructor.
*/
public function __construct()
{
parent::__construct(self::ID, 'KFZ', [PrivateSachversicherung::KFZ]);
}
}
23 changes: 23 additions & 0 deletions src/Werte/Bedarf/Thema/Themen/Pflegevorsorge.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php

namespace Demv\Werte\Bedarf\Thema\Themen;

use Demv\Werte\Bedarf\Thema\Bedarfsthema;
use Demv\Werte\Sparte\Sparten\Vorsorge;

/**
* Class Pflegevorsorge
* @package Demv\Werte\Bedarf\Thema\Themen
*/
final class Pflegevorsorge extends Bedarfsthema
{
const ID = 9;

/**
* Pflegevorsorge constructor.
*/
public function __construct()
{
parent::__construct(self::ID, 'Pflegevorsorge', [Vorsorge::PFLEGEVERSICHERUNG]);
}
}
22 changes: 22 additions & 0 deletions src/Werte/Bedarf/Thema/Themen/Privathaftpflicht.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php

namespace Demv\Werte\Bedarf\Thema\Themen;

use Demv\Werte\Bedarf\Thema\Bedarfsthema;

/**
* Class Privathaftpflicht
* @package Demv\Werte\Bedarf\Thema\Themen
*/
final class Privathaftpflicht extends Bedarfsthema
{
const ID = 10;

/**
* Privathaftpflicht constructor.
*/
public function __construct()
{
parent::__construct(self::ID, 'Privathaftpflicht', [\Demv\Werte\Sparte\Sparten\Privathaftpflicht::ID]);
}
}
30 changes: 30 additions & 0 deletions src/Werte/Bedarf/Thema/Themen/Rechtsschutz.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?php

namespace Demv\Werte\Bedarf\Thema\Themen;

use Demv\Werte\Bedarf\Thema\Bedarfsthema;
use Demv\Werte\Sparte\Sparten\RechtsschutzPrivat;

/**
* Class Rechtsschutz
* @package Demv\Werte\Bedarf\Thema\Themen
*/
final class Rechtsschutz extends Bedarfsthema
{
const ID = 13;

/**
* Rechtsschutz constructor.
*/
public function __construct()
{
parent::__construct(self::ID, 'Rechtsschutz', [
RechtsschutzPrivat::ID,
RechtsschutzPrivat::VERMIETER,
RechtsschutzPrivat::MIETER_EIGENTUEMER,
RechtsschutzPrivat::BERUF,
RechtsschutzPrivat::VERKEHR,
RechtsschutzPrivat::PRIVAT,
]);
}
}
23 changes: 23 additions & 0 deletions src/Werte/Bedarf/Thema/Themen/Unfallversicherung.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php

namespace Demv\Werte\Bedarf\Thema\Themen;

use Demv\Werte\Bedarf\Thema\Bedarfsthema;
use Demv\Werte\Sparte\Sparten\PrivateSachversicherung;

/**
* Class Unfallversicherung
* @package Demv\Werte\Bedarf\Thema\Themen
*/
final class Unfallversicherung extends Bedarfsthema
{
const ID = 8;

/**
* Unfallversicherung constructor.
*/
public function __construct()
{
parent::__construct(self::ID, 'Unfallversicherung', [PrivateSachversicherung::UNFALLVERSICHERUNG]);
}
}
23 changes: 23 additions & 0 deletions src/Werte/Bedarf/Thema/Themen/Wohngebaeude.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php

namespace Demv\Werte\Bedarf\Thema\Themen;

use Demv\Werte\Bedarf\Thema\Bedarfsthema;
use Demv\Werte\Sparte\Sparten\PrivateSachversicherung;

/**
* Class Wohngebaeude
* @package Demv\Werte\Bedarf\Thema\Themen
*/
final class Wohngebaeude extends Bedarfsthema
{
const ID = 12;

/**
* Wohngebaeude constructor.
*/
public function __construct()
{
parent::__construct(self::ID, 'Wohngebäude', [PrivateSachversicherung::WOHNGEBAUEDEVERSICHERUNG]);
}
}
2 changes: 1 addition & 1 deletion src/Werte/Bedarf/Thema/Themen/Zahnzusatz.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ final class Zahnzusatz extends Bedarfsthema
*/
public function __construct()
{
parent::__construct(self::ID, 'Zahnzusatz', [PrivateKrankenzusatzversicherung::DENTAL_ZAHN]);
parent::__construct(self::ID, 'Zahnzusatzversicherung', [PrivateKrankenzusatzversicherung::DENTAL_ZAHN]);
}
}
6 changes: 0 additions & 6 deletions src/Werte/Sparte/Sparten/Privathaftpflicht.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
<?php
/**
* Created by PhpStorm.
* User: alex
* Date: 11.01.17
* Time: 11:11
*/

namespace Demv\Werte\Sparte\Sparten;

Expand Down
6 changes: 0 additions & 6 deletions src/Werte/Sparte/Sparten/RechtsschutzPrivat.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
<?php
/**
* Created by PhpStorm.
* User: alex
* Date: 11.01.17
* Time: 11:06
*/

namespace Demv\Werte\Sparte\Sparten;

Expand Down
19 changes: 19 additions & 0 deletions tests/Werte/Bedarf/Thema/BedarfsthemaTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php

namespace Demv\Werte\Tests\Bedarf\Thema;

use Demv\Werte\Bedarf\Thema\Bedarfsthema;
use PHPUnit\Framework\TestCase;

/**
* Class BedarfsthemaTest
* @package Demv\Werte\Tests\Bedarf\Thema
*/
final class BedarfsthemaTest extends TestCase
{
public function testBedarfsthema()
{
$bedarfsthema = new Bedarfsthema(0, 'test', [99, 100]);
$this->assertCount(2, $bedarfsthema->getSpartenIds());
}
}
2 changes: 1 addition & 1 deletion tests/Werte/Bedarf/Thema/BedarfsthemenTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ private function getBedarfsthemen(): Bedarfsthemen
public function testGetAll(): void
{
$themen = $this->getBedarfsthemen();
$this->assertCount(7, $themen->getAll());
$this->assertCount(14, $themen->getAll());
}

public function testGetBerufsunfaehigkeit(): void
Expand Down
9 changes: 8 additions & 1 deletion tests/Werte/Kraftstoff/KraftstoffTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use Demv\Werte\Kraftstoff\Kraftstoffe\Benzin;
use Demv\Werte\Kraftstoff\Kraftstoffe\Diesel;
use Demv\Werte\Kraftstoff\Kraftstoffe\Elektro;
use Demv\Werte\Kraftstoff\Kraftstoffe\Gas;
use Demv\Werte\Kraftstoff\Kraftstoffe\Hybrid;
use Demv\Werte\Tests\ProviderTestTrait;
use PHPUnit\Framework\TestCase;
Expand All @@ -30,7 +31,8 @@ public function __construct()

public function testGetAll(): void
{
$this->assertEquals(5, count($this->provider->getAll()));
$kraftstoffe = new Kraftstoffe();
$this->assertCount(5, $kraftstoffe->getAll());
}

public function testBenzin(): void
Expand All @@ -53,6 +55,11 @@ public function testHybrid(): void
$this->checkGetOne($this->provider, Hybrid::class);
}

public function testGas(): void
{
$this->checkGetOne($this->provider, Gas::class);
}

public function testNotFound(): void
{
$this->expectException(EntryNotFoundException::class);
Expand Down

0 comments on commit 9fcf3fe

Please sign in to comment.