Git Product home page Git Product logo

phpunit's Introduction

Brandastic PHPUnit Example
author: Xavier Baez

------------------------------------------------------------------
HOW TO USE:

cd /vendor/bin/
php phpunit --verbose ../../tests/ConfigRepositoryTest.php

------------------------------------------------------------------
FILES:

/Brandastic/Unit/src/ConfigRepository.php
/Brandastic/Unit/tests/ConfigRepositoryTest.php

------------------------------------------------------------------
OBJECTIVE:

Create a configuration repository which can be used to hold an application's config variables.
The class is already created with the required methods in the src directory.  Build each method
and run vendor/bin/phpunit from the command line to test.

REQUIREMENTS:
Configuration values must be able to be optionally set through the constructor when the class
is instantiated.

Configuration values must be accessible through array access

An unlimited number of configuration values should be able to be set

The set and remove methods must be chainable

Explanations of what method is used for is included within the commentaries.


------------------------------------------------------------------
FRAMEWORKS USED:

1. PHPUnit 5.7.17 by Sebastian Bergmann and contributors.

Copyright (c) 2001-2017, Sebastian Bergmann <[email protected]>.
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:

 * Redistributions of source code must retain the above copyright
   notice, this list of conditions and the following disclaimer.

 * Redistributions in binary form must reproduce the above copyright
   notice, this list of conditions and the following disclaimer in
   the documentation and/or other materials provided with the
   distribution.

 * Neither the name of Sebastian Bergmann nor the names of his
   contributors may be used to endorse or promote products derived
   from this software without specific prior written permission.

2. Composer

Copyright (c) 2015 Nils Adermann, Jordi Boggiano

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.