In this post i’m going to show you how to enable database migrations with Laravel and PHPUnit.
First add two elements to phpunit.xml which the the XML Configuration File for PHPUnit.
We are using sqlite for the connection and a memory database.Let’s add some methods in TestCase.php file
Let’s write our first test
Enable database migrations with DatabaseMigrations trait:
Run the test:
Simple steps how to use Swift 2.2 with latest Xcode.First of all install swift 2.2 there’s a package installer on the website https://swift.org/download/ or build it from terminal instructions here https://github.com/apple/swift.
after the installation process make sure the proper version is installed from the terminal run:
we have 2 toolchains installed the default location is:
quit Xcode and run from the terminal
Sometimes we want to execute Xcode unit tests from the command line and format xcodebuild’s output make it pretty and readable, the perfect ruby gem for this job is xcpretty.
create shell script:
add the following script:
make it executable:
run the tests
or you can run tests from the command line:
Xcode 7 requires swift 2.0 but current version of ReactiveCocoa uses 1.2 checkout the ‘swift2’ branch and build the framework.