Download the PHP package n-educatio/testbundle without Composer

On this page you can find all versions of the php package n-educatio/testbundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package testbundle

TestBundle

Paczka usprawnia mechanizm Symfonowskiego ładowania fixturesów. Paczka jest całkowicie autonomiczna, oraz jest pokryta testami jednostkowymi w 100%. Co więcej, TestBundle wprowadza nową zasadę odwoływania się do konkretnych elementów na stronie za pomocą tak zwanych uchwytów.

Build Status

Instalacja

Zmiany dla pliku composer.json

Następnie instalujemy brakujące vendorsy:

Uruchamianie testów paczki TestBundle

ant test - testy phpunit oraz testy behat

Przykład użycia fixturesów

Przykład można zobaczyć tutaj

Przykład użycia uchwytów

Przykład testu dla zmiany języka:

Kontekst

W naszym przypadku PageObjectem może stać się każdy element na stronie, taki jak menu, panel językowy, itp. Na co należy zwrócić uwagę to pole $proofSelector, które informuje o zasięgu działania PageObjectu.

Zauważ, że metoda get() pobiera teraz uchwyt id, który musi być zahardkodowany w htmlu jako t_uchwyt.

Podział na Persony/itp

Naszym celem jest wczytanie tylko konkrentych Fixturesów potrzebnych do odpalenia testów, stąd każdy Fixture deklarowany jest jako konkrenta Osoba/Kurs/Komentarz/itd, który posiada unikatowe właściwości i atrybuty. Powiedzmy, że w naszym systemie istnieje dwóch testowych użytkowników: Julia Lazy ( persona, która jest już zarejestrowana w serwisie ) oraz Amy Fresh ( persona nie powiązana jeszcze w żaden sposób z aplikacją, ale posiadająca swój własny adres email, nazwę itp. Tworzymy je w następujący sposób: Nasza Amy Fresh

Oraz Julia Lazy

Obie persony w tym przypadku muszą dziedziczyć po klasie LoadActorUserData. Oczywistym staje się fakt, że każdy rodzaj person będzie miał analogicznie budowaną klasę, po której dziedziczą persony tego samego rodzaju.

Zależności

Dodawanie

Przejdżmy teraz do sedna możliwości naszego TestBundle. Załóżmy, że chcemy dodać do naszych Fixturesów pewne zależności. Robimy to w bardzo prosty sposób. W klasie Fixture A, która jest zależna od klasy Fixture B dodajemy taki oto krótki wpis:

Teraz za każdym razem, gdy będziemy próbowali wczytać Fixture A, nasz TestBundle doczyta nam zależny Fixture B.

Wczytywanie

Czas na ostatni krok, jakim jest wczytanie Fixturesów. By móc tego dokonać należy w metodzie kontekstu dodać poniższy kod:


All versions of testbundle with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.3
symfony/symfony Version 2.3.*
symfony/framework-bundle Version ~2.3
doctrine/orm Version >=2.2.3,<2.4-dev
doctrine/doctrine-fixtures-bundle Version dev-master
doctrine/data-fixtures Version dev-master
behat/mink-extension Version ~1.2
behat/mink-goutte-driver Version *
behat/mink-selenium2-driver Version *
behat/symfony2-extension Version *
mockery/mockery Version >=0.7.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package n-educatio/testbundle contains the following files

Loading the files please wait ....