ホーム > php > PEAR::Services_Twitterのリスト対応

PEAR::Services_Twitterのリスト対応

パッチ
services_twitter.diff
13828 byte
[md5] cfbc090a25f68b8f0ea52a281aeccbe7
パッチ(テスト部分)
services_twitter_test.diff
119284 byte
[md5] e238637ffc8953b2e6bb5249b20e8c48
一括
Services_Twitter.tar.gz
59834 byte
[md5]145d9e35e4000e7700e228f1f59a4e6a
追加メソッド一覧

Methods                 Documentatation name        tests
----------------------- --------------------------- ---------------------------------------
trends/available                                    840-trends-available.phpt
trends/location                                     850-trends-location.phpt
lists/create            POST lists      (create)    153-lists-create-delete.phpt
lists/update            POST lists id  (update)     151-lists-update.phpt
lists/list              GET lists        (index)    150-lists-list.phpt
lists/show              GET list id      (show)     152-lists-show.phpt
lists/delete            DELETE list id (destroy)    153-lists-create-delete.phpt
lists/statuses          GET list statuses           160-lists-statuses.phpt
lists/memberships       GET list memberships        161-lists-memberships.phpt
lists/subscriptions     GET list subscriptions      162-lists-subscriptions.phpt

list_members/list       GET list members            181-list_members-list.phpt
list_members/create     POST list members           180-list_members-create-delete.phpt
list_members/delete     DELETE list members         180-list_members-create-delete.phpt
list_members/show       GET list members id         182-list_members-show.phpt

list_subscribers/list   GET list subscribers        191-list_subscribers-list.phpt
list_subscribers/create POST list subscribers       190-list_subscribers-create-delete.phpt
list_subscribers/delete DELETE list subscribers     190-list_subscribers-create-delete.phpt
list_subscribers/show   GET list subscribers id     192-list_subscribers-show.phpt


パッチは現段階での最新である295629に当ててください。

$ svn export -r 295629 http://svn.php.net/repository/pear/packages/Services_Twitter/trunk Services_Twitter
$ wget http://blog.cheki.net/services_twitter.diff
$ cd Services_Twitter
$ patch -p0 < ../services_twitter.diff
patching file Services/Twitter.php
patching file data/api.xml
patching file data/api.rng

テスト部へのパッチが必要な場合は別途

$ patch -p0 < ../services_twitter_test.diff
patching file tests/181-list_members-list.phpt
patching file tests/192-list_subscribers-show.phpt
patching file tests/tests-config.php.example
patching file tests/151-lists-update.phpt
patching file tests/data/list_subscribers/list.dat
patching file tests/data/list_subscribers/show.dat
patching file tests/data/list_subscribers/delete.dat
patching file tests/data/list_subscribers/create.dat
patching file tests/data/list_members/list.dat
patching file tests/data/list_members/show.dat
patching file tests/data/list_members/delete.dat
patching file tests/data/list_members/create.dat
patching file tests/data/lists/statuses.dat
patching file tests/data/lists/list.dat
patching file tests/data/lists/memberships.dat
patching file tests/data/lists/show.dat
patching file tests/data/lists/update.dat
patching file tests/data/lists/delete.dat
patching file tests/data/lists/create.dat
patching file tests/data/lists/subscriptions.dat
patching file tests/data/trends/location.dat
patching file tests/data/trends/available.dat
patching file tests/191-list_subscribers-list.phpt
patching file tests/153-lists-create-delete.phpt
patching file tests/162-lists-subscriptions.phpt
patching file tests/150-lists-list.phpt
patching file tests/160-lists-statuses.phpt
patching file tests/182-list_members-show.phpt
patching file tests/setup.php
patching file tests/161-lists-memberships.phpt
patching file tests/850-trends-location.phpt
patching file tests/152-lists-show.phpt
patching file tests/840-trends-available.phpt
patching file tests/190-list_subscribers-create-delete.phpt

テスト

$ php tests/AllTests.php
PHPUnit 3.4.11 by Sebastian Bergmann.

..................................................

Time: 4 seconds, Memory: 9.75Mb

OK (50 tests, 0 assertions)

tests-config.phpセット後。

$ php tests/AllTests.php
PHPUnit 3.4.11 by Sebastian Bergmann.

..........S....F.......S.....S..........S.....F.S.

Time: 48 seconds, Memory: 10.00Mb

There were 2 failures:

1) /home/cockok/projects/Services_Twitter/tests/460-account-update_profile_image.phpt
--- Expected
+++ Actual
@@ @@
-bool(true)
+bool(false)

/home/cockok/projects/Services_Twitter/tests/AllTests.php:56
/home/cockok/projects/Services_Twitter/tests/AllTests.php:72

2) /home/cockok/projects/Services_Twitter/tests/470-account-update_profile_background_image.phpt
--- Expected
+++ Actual
@@ @@
-bool(true)
+あなたが設定した背景用の画像に問題があるようです。おそらく大きすぎです。 (code: 403, call: http://api.twitter.com/1/account/update_profile_background_image.json)

/home/cockok/projects/Services_Twitter/tests/AllTests.php:56
/home/cockok/projects/Services_Twitter/tests/AllTests.php:72

FAILURES!
Tests: 50, Assertions: 0, Failures: 2, Skipped: 5.

画像周りでエラーでてるけどもともと出てるようなので知りません。

カテゴリー: php タグ: