SlideShare a Scribd company logo
PHP
      Kansai Unconference 2009/12/19
                        id:heavenshell
PHP

lime

Demo
…
PHP

  Zend Framework

  Python, Vim               Java(Cubby   )


http://twitter.com/heavenshell
PHP      …



assert
xUnit(PHPUnit)

assert




※
PHP

phpt
  PHP       PEAR

PHPUnit
  PHP   xUnit

SimpleTest
  CakePHP       PHP4

lime
  Symfony
xUnit                    PHPUnit, SimpleTest

 CakePHP                        SimpleTest

phpt   lime     xUnit

       PHPSpec          rhaco      DocTest

                          lime
lime
 Symfony Project
   (Symfony                             )

   http://trac.symfony-project.org/wiki/LimeTestingFramework

 xUnit

   assertEquals
<?php
class Users
{
    public function isLogin($user, $password)
    {
        // DB

        return $dao->auth($user, $password);
    }
}
lime
 <?php

 require_once 'lime.php';

 $t = new lime_test(null, new lime_output_color());

 $user = new Users();

 $ret = $user->isLogin('userid', 'password');

 $t->ok($ret === true, '                          true   ');

          assertEquals

 $ php Login.php
 ok 1 -                           true

 1..1
$t->ok(); // ===

$t->is(); // ==

$t->like(); //



                   lime
Demo
lime

                 PHPUnit   SimpleTest



       PHPUnit
                    lime
Google                php lime

PHP        Test::More                  Lime
http://d.hatena.ne.jp/studio-m/20081231/1230725644

lime
http://d.hatena.ne.jp/anatoo/20090503/1241279965

TOM
http://www.phppro.jp/school/test/
Piece Framework        WAF                Piece
Project   PHPUnit, SimpleTest, PHPSpec, phpt
                Stagehand_Testrunner




     Piece Project   Make Good         Eclipse
                           JUnit         Eclipse
関西アンカンファレンス PHP ではじめるテストコード

More Related Content

KEY
関西 Unconferance Sphinx かわいいよ Sphinx
KEY
Zend Framework Study@Tokyo #2
PDF
PHP7 is coming
ODP
PHP Tips for certification - OdW13
PDF
The new features of PHP 7
PDF
Quick tour of PHP from inside
PPTX
Zephir - A Wind of Change for writing PHP extensions
ODP
PHP5.5 is Here
関西 Unconferance Sphinx かわいいよ Sphinx
Zend Framework Study@Tokyo #2
PHP7 is coming
PHP Tips for certification - OdW13
The new features of PHP 7
Quick tour of PHP from inside
Zephir - A Wind of Change for writing PHP extensions
PHP5.5 is Here

What's hot (20)

PDF
East Bay Ruby Tropo presentation
PDF
How to deploy node to production
PPTX
Php 7 hhvm and co
PPTX
PHP7 Presentation
ODP
Php in 2013 (Web-5 2013 conference)
PDF
IPC2010SE Doctrine2 Enterprise Persistence Layer for PHP
ODP
What's new in Perl 5.10?
KEY
Kansai.pm 10周年記念 Plack/PSGI 入門
PDF
Profiling php5 to php7
PDF
What's new in PHP 5.5
ODP
The why and how of moving to php 5.4
PPT
The Php Life Cycle
PDF
Understanding PHP objects
ODP
The why and how of moving to PHP 5.4/5.5
KEY
Yapcasia2011 - Hello Embed Perl
PPTX
Introducing PHP Latest Updates
PPT
How PHP Works ?
KEY
Remedie: Building a desktop app with HTTP::Engine, SQLite and jQuery
PDF
Building Custom PHP Extensions
PDF
Php7 extensions workshop
East Bay Ruby Tropo presentation
How to deploy node to production
Php 7 hhvm and co
PHP7 Presentation
Php in 2013 (Web-5 2013 conference)
IPC2010SE Doctrine2 Enterprise Persistence Layer for PHP
What's new in Perl 5.10?
Kansai.pm 10周年記念 Plack/PSGI 入門
Profiling php5 to php7
What's new in PHP 5.5
The why and how of moving to php 5.4
The Php Life Cycle
Understanding PHP objects
The why and how of moving to PHP 5.4/5.5
Yapcasia2011 - Hello Embed Perl
Introducing PHP Latest Updates
How PHP Works ?
Remedie: Building a desktop app with HTTP::Engine, SQLite and jQuery
Building Custom PHP Extensions
Php7 extensions workshop
Ad

Similar to 関西アンカンファレンス PHP ではじめるテストコード (20)

PDF
The new features of PHP 7 - Enrico Zimuel - Codemotion Milan 2016
PDF
The symfony platform: Create your very own framework (PHP Quebec 2008)
PPTX
Design patterns as power of programing
PDF
Living With Legacy Code
PPS
Simplify your professional web development with symfony
PDF
Grâce aux tags Varnish, j'ai switché ma prod sur Raspberry Pi
ODP
From Code to Cloud - PHP on Red Hat's OpenShift
ODP
PHPNW Test Fest Pre-presentation
PDF
Behavior & Specification Driven Development in PHP - #OpenWest
PDF
Lean Php Presentation
PDF
How Symfony changed my life (#SfPot, Paris, 19th November 2015)
PPTX
PHP 5.3
PPT
PHPUnit Automated Unit Testing Framework
PPTX
Php7 HHVM and co
PDF
CodePolitan Webinar: The Rise of PHP
PDF
PHP 5.3 in practice
PDF
How Symfony Changed My Life
PDF
Introduction to PowerShell
KEY
Prepare for PHP Test Fest 2009
PDF
Fighting Fear-Driven-Development With PHPUnit
The new features of PHP 7 - Enrico Zimuel - Codemotion Milan 2016
The symfony platform: Create your very own framework (PHP Quebec 2008)
Design patterns as power of programing
Living With Legacy Code
Simplify your professional web development with symfony
Grâce aux tags Varnish, j'ai switché ma prod sur Raspberry Pi
From Code to Cloud - PHP on Red Hat's OpenShift
PHPNW Test Fest Pre-presentation
Behavior & Specification Driven Development in PHP - #OpenWest
Lean Php Presentation
How Symfony changed my life (#SfPot, Paris, 19th November 2015)
PHP 5.3
PHPUnit Automated Unit Testing Framework
Php7 HHVM and co
CodePolitan Webinar: The Rise of PHP
PHP 5.3 in practice
How Symfony Changed My Life
Introduction to PowerShell
Prepare for PHP Test Fest 2009
Fighting Fear-Driven-Development With PHPUnit
Ad

Recently uploaded (20)

PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Review of recent advances in non-invasive hemoglobin estimation
PPTX
Cloud computing and distributed systems.
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
A Presentation on Artificial Intelligence
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Electronic commerce courselecture one. Pdf
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
Encapsulation theory and applications.pdf
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Unlocking AI with Model Context Protocol (MCP)
The Rise and Fall of 3GPP – Time for a Sabbatical?
Per capita expenditure prediction using model stacking based on satellite ima...
Review of recent advances in non-invasive hemoglobin estimation
Cloud computing and distributed systems.
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Agricultural_Statistics_at_a_Glance_2022_0.pdf
A Presentation on Artificial Intelligence
Digital-Transformation-Roadmap-for-Companies.pptx
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Electronic commerce courselecture one. Pdf
Assigned Numbers - 2025 - Bluetooth® Document
Encapsulation theory and applications.pdf
NewMind AI Weekly Chronicles - August'25-Week II
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Dropbox Q2 2025 Financial Results & Investor Presentation
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Unlocking AI with Model Context Protocol (MCP)

関西アンカンファレンス PHP ではじめるテストコード

  • 1. PHP Kansai Unconference 2009/12/19 id:heavenshell
  • 3.
  • 4. PHP Zend Framework Python, Vim Java(Cubby ) http://twitter.com/heavenshell
  • 5. PHP … assert
  • 7. PHP phpt PHP PEAR PHPUnit PHP xUnit SimpleTest CakePHP PHP4 lime Symfony
  • 8. xUnit PHPUnit, SimpleTest CakePHP SimpleTest phpt lime xUnit PHPSpec rhaco DocTest lime
  • 9. lime Symfony Project (Symfony ) http://trac.symfony-project.org/wiki/LimeTestingFramework xUnit assertEquals
  • 10. <?php class Users { public function isLogin($user, $password) { // DB return $dao->auth($user, $password); } }
  • 11. lime <?php require_once 'lime.php'; $t = new lime_test(null, new lime_output_color()); $user = new Users(); $ret = $user->isLogin('userid', 'password'); $t->ok($ret === true, ' true '); assertEquals $ php Login.php ok 1 - true 1..1
  • 12. $t->ok(); // === $t->is(); // == $t->like(); // lime
  • 13. Demo
  • 14. lime PHPUnit SimpleTest PHPUnit lime
  • 15. Google php lime PHP Test::More Lime http://d.hatena.ne.jp/studio-m/20081231/1230725644 lime http://d.hatena.ne.jp/anatoo/20090503/1241279965 TOM http://www.phppro.jp/school/test/
  • 16. Piece Framework WAF Piece Project PHPUnit, SimpleTest, PHPSpec, phpt Stagehand_Testrunner Piece Project Make Good Eclipse JUnit Eclipse