Kaynağa Gözat

Écrire un premier test unitaire #1300

feature/souke
Guillaume Bourgeois 1 yıl önce
ebeveyn
işleme
b118415226
3 değiştirilmiş dosya ile 3302 ekleme ve 1 silme
  1. +3270
    -1
      tests/codeception/common/_support/_generated/UnitTesterActions.php
  2. +7
    -0
      tests/codeception/common/unit.suite.yml
  3. +25
    -0
      tests/codeception/common/unit/ExampleTest.php

+ 3270
- 1
tests/codeception/common/_support/_generated/UnitTesterActions.php
Dosya farkı çok büyük olduğundan ihmal edildi
Dosyayı Görüntüle


+ 7
- 0
tests/codeception/common/unit.suite.yml Dosyayı Görüntüle

@@ -4,3 +4,10 @@
# RUN `build` COMMAND AFTER ADDING/REMOVING MODULES.

class_name: UnitTester
modules:
enabled:
- Asserts
- Yii2
config:
Yii2:
configFile: '../config/common/unit.php'

+ 25
- 0
tests/codeception/common/unit/ExampleTest.php Dosyayı Görüntüle

@@ -0,0 +1,25 @@
<?php

namespace tests\codeception\common\unit;

//use \Tests\Support\UnitTester;

use common\logic\Producer\Producer\Model\Producer;
use common\logic\Producer\Producer\Wrapper\ProducerContainer;
use tests\codeception\common\UnitTester;

class ExampleTest extends \Codeception\Test\Unit
{
protected UnitTester $tester;

protected function _before()
{
}

public function testMe()
{
$producerContainer = ProducerContainer::getInstance();
$producer = $producerContainer->getBuilder()->instanciateProducer();
$this->assertTrue($producer instanceof Producer, 'Producer instancié');
}
}

Yükleniyor…
İptal
Kaydet