2015-10-22 9 views
6

tanımsız Ve benim yapılandırm şunun gibidir:Codeception AcceptanceTester :: loadSessionSnapshot bu hata nedeniyle bir projeyi test çalışıyorum ama giriş sayfasını kontrol edemedi am

# Codeception Test Suite Configuration 
# 
# Suite for acceptance tests. 
# Perform tests in browser using the WebDriver or PhpBrowser. 
# If you need both WebDriver and PHPBrowser tests - create a separate suite. 

class_name: AcceptanceTester 
modules: 
    enabled: 
     - PhpBrowser: 
      url: http://myweb.com 
     - \Helper\Acceptance 

E komut bir komut

codecept.bat generate:cept acceptance loginTest 

cevap

3

PhpBrowser modülünde böyle bir yöntem yoktur, loadSessionSnapshot yöntem sadece WebDriver tarafından sağlanır.

Testlerde çıkış() kullanmayın, Codeception'ı da öldürür. Bunun yerine atlama yöntemini kullanın.

if($I->loadSessionSnapshot('loggedin')) { 
    $scenario->skip('Already logged in'); 
} 
+0

PhpBrowser yakında destek alabilirsiniz: https://github.com/Codeception/Codeception/pull/3321#issuecomment-231206894 –

İlgili konular